[Coco] Returning a string to basic ?
mikehsk at bellsouth.net
Tue Sep 20 18:23:55 EDT 2011
> PEEK(ST) will return the length of the string variable
> PEEK(ST+2) will be the MSB of the variable first character address in memory
> PEEK(ST+3) will be the LSB of the variable first character address in memory
> Examining RAM locations after the MSB& LSB are calculated up to the length
> of the string will reveal the variable contents.
> As noted, manipulating these values once a string variable has been defined
> we can put whatever we want in the string variable... as long as it is at
> most 255 bytes long ;-)
If the string is a fixed string, this will modify the code of basic
program itself. Adding a null string will fix the problem if I remember
More information about the Coco