[futurebasic] Re: [FB] Dimming vars

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : August 1999 : Group Archive : Group : All Groups

From: Mark Goodes <wave@...>
Date: Sun, 1 Aug 1999 03:21:48 -0400
>    So what happens, for example, if the previously allocated string is
>at seven bytes in length (8 with length byte), but I need my "not to be
>parameter string to occupy a full 255 bytes long (256 with length byte)?

Try this:

dim 255 myString$
local fn ReceiveString(strPtr&)
end fn

dim 15 passString$
local fn passString
  passString$="short string"
  fn ReceiveString(@passString$)
end fn

In this format we pass the address of a string explicitly, instead of the
string itself (actually FB passes addresses anyways but now we have more
control over what is being done).

Mark Goodes (Toronto, Canada)