[futurebasic] Re: [FB] How to reinit array

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

From: Jay Reeve <jktr@...>
Date: Sun, 28 Feb 99 17:20:41 -0600
>>I want to be able to reset all str$ to "" and all elements% to = 0 for each
>of
>>the 720 reiterations of the array without a FOR - NEXT loop. Can I?
>
>I think this should do it:
>DEF LONGBLOCKFILL(@myArray, _myRec*720, 0)
>sets all bytes in the array to 0 so string length bytes will be 0 therefor 
>the
>strings = ""
>
Yes, this will do what you are asking, but it is also likely to take 
longer (if that is the consideration) than using the loop:

endStr& = @myArray(721)
FOR j& = @myArray(0) to endStr& step _myRec
  POKE j&, 0
NEXT

This loop sets only the length bytes, whereas a BLOCKFILL sets _every_ 
byte.

 0"0
 =J= a  y
  "