[Coco] What are the rules for naming basic09 variables ?

L. Curtis Boyle curtisboyle at sasktel.net
Sat Jul 27 20:17:27 EDT 2019


I think some of you are mixing up the maximum length of a directory entry (which is up to 29 characters, with the high bit set on the last byte) vs. a variable name in BASIC09, which is limited only by the amount of RAM you want to waste on a variable name within your processes’ workspace (until you PACK it, anyways). 
:-)

L. Curtis Boyle
curtisboyle at sasktel.net



> On Jul 27, 2019, at 5:35 PM, Gene Heskett <gheskett at shentel.net> wrote:
> 
> On Saturday 27 July 2019 05:03:15 Wayne Campbell wrote:
> 
>> I have done experiments before. It's 29 for variable names. 30 drops
>> the last character. I don't know if variable names have a terminating
>> 0 unless they are shorter than 29 characters.
>> 
> Thats one of the reasons I wrote gsort a couple decades back, it reads 
> dir names until the high bit is set. I don't recall now but someone had 
> written another disk utility that left old name garbage beyond whatever 
> was the official name of the file.  So gsort zero's out between the 
> marked end of the name to the 29th byte, leaving the real name and  
> address of the FDS intact.  Nice clean directory's that way. And it 
> sorts deleted files, with a null first char, to the bottom of the list 
> and clears them, all 32 bytes, before writing it back to the file.
> 
> Sheesh, its been yonks since then, and my memory is needing more and more 
> refreshing. I hate to admit that after 84 years, short term memory is 
> starting to go away...



More information about the Coco mailing list