[futurebasic] Re: [FB] Re: container question

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : September 2001 : Group Archive : Group : All Groups

From: Jay Reeve <jktr@...>
Date: Fri, 7 Sep 01 00:19:15 -0500
>i would suggest that we need two new functions/statements:
>  FBemptyContainer( gContainer)
>   // this empties a container but keeps it around
>  myLong = FBisContainerEmpty( gContainer)
>   // returns _false [Ø] if no content, and could return the size if not
>

//Run in Console
local mode
local fn FBemptyContainer( @C as ptr)
// this empties a container but keeps it around
if C.0& then sethandlesize(C.0&,0)
end fn

local mode
clear local fn FBisContainerEmpty( @C as ptr)
// returns _false [Ø] if no content, and could return the size if not
dim rslt
if C.0& then rslt = fn gethandlesize(C.0&) = 0
end fn = rslt

dim c$$

C = "1234567890"
print C
long if fn FBisContainerEmpty(C)
print "Empty"
xelse
print "Not empty"
end if
fn FBemptyContainer(C)
print C
long if fn FBisContainerEmpty(C)
print "Empty"
xelse
print "Not empty"
end if

 0"0
 =J= a  y
  "