[futurebasic] Re: [FB] blockmoving

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

From: Jay Reeve <jktr@...>
Date: Wed, 19 May 99 08:40:13 -0500
>Does FB _always_ position dimensioned variables in _contiguous_ memory? If
>it does then I don't see anything wrong with your approach, although I would
>add "1" to blkSize& like so:
>
>   blkSize& = (@gBottomOfPrinterGlbls% + 1) - @gTopOfPrinterGlbls%
>
>Reason being, even though gBottomOfPrinterGlbls% has been allocated zero
>bytes, my feeling is that at least 1 byte must be allocated to make it
>valid.
>
Chris,

Your logic here seems reasonable, but if Pete takes your suggestion he 
will overwrite the first byte of whatever follows his printer globals in 
memory when he does the blockmove! My approach to the same concern would 
be either to go ahead and allocate the two bytes for 
gBottomOfPrinterGlbls%

  DIM gBottomOfPrinterGlbls%

or to simply make sure another global is DIMmed after it

  DIM gBottomOfPrinterGlbls%;0
  DIM gBlockSize%

 I suspect it would actually work the way he had it originally, but I 
haven't checked.

 0"0
 =J= a  y
  "