[futurebasic] Re: [FB] blockmoving

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

From: "Chris Pereira" <nidus@...>
Date: Wed, 19 May 1999 09:01:25 -0400
>DIM gTopOfPrinterGlbls%;0
>DIM gXprintDlog&
>DIM gXADDtxtToHNDL&
>DIM gXtoPrintEngine&
>DIM gXcalcPageRects&
>DIM gXdoPageHeaderAndFooter&
>DIM gXcalcPictDrawRect&
>DIM gXcheckFontAndSize&
>DIM gXinsertFormattingIntoTxtHndl&
>DIM gXcreateTxtHndl&
>DIM gXdeleteTxtHndl&
>DIM gXpadTxtWithSpaces&
>DIM gXisLaserTest&
>DIM gBottomOfPrinterGlbls%;0
>
>blkSize& = @gBottomOfPrinterGlbls% - @gTopOfPrinterGlbls%
>BLOCKMOVE @gTopOfPrinterGlbls% somePointer&, blkSize&


I don't have an answer to your question, but I do have a question that might
provide an answer:

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