[Coco] What are the rules for naming basic09 variables ?
Alex Evans
varmfskii at gmail.com
Fri Jul 26 21:48:21 EDT 2019
As to filenames, yes. You have a 32 byte field that consists of 29
bytes for the name (high-bit terminated) and 3 bytes for the LSN of
the file descriptor sector (think inode).
On Fri, Jul 26, 2019 at 9:44 PM Wayne Campbell <asa.rand at gmail.com> wrote:
>
> I recall reading in the Basic09 manual there is a 29 character variable
> name limit. String variables can be DIMd to 32767 characters length. OS-9
> filenames are also limited to 29 characters I believe.
>
> On Fri, Jul 26, 2019, 6:01 PM James Jones <jejones3141 at gmail.com> wrote:
>
> > Looked a little more, and the only hard limit I've found so far is that as
> > part of the lexical scanning, the name length is accumulated in the B
> > register..
> >
> > On Fri, Jul 26, 2019 at 5:49 PM L. Curtis Boyle <curtisboyle at sasktel.net>
> > wrote:
> >
> > > Actually, from what I remember, the length of a variable name is only
> > > limited to free RAM. If you want to make a 100 character variable, it
> > will
> > > work (and if you made a second the same length but the last character
> > > changed, they would still be considered unique). Of course, once you PACK
> > > it, that is all gone anyways, but in the BASIC09 editor, it just consumes
> > > more space in the variable name table.
> > >
> > > L. Curtis Boyle
> > > curtisboyle at sasktel.net
> > >
> > >
> > >
> > > > On Jul 26, 2019, at 4:16 PM, coco at jechar.ca wrote:
> > > >
> > > >
> > > > Thanks I will try some things based on these rules to confirm and then
> > > let everyone know.
> > > >
> > > > On 2019-07-26 17:49, James Jones wrote:
> > > >> I'd have to look or experiment to confirm the 29-character limit,
> > > though I
> > > >> have no reason not to believe it and it would make sense if symbol
> > table
> > > >> entries are 32 bytes. The rest I can confirm is exactly right.
> > Variable
> > > >> (and parameter) names must start with a letter, with the remaining
> > being
> > > >> either letters, digits, or underscores, optionally ending with dollar
> > > sign
> > > >> but only if its type is string.
> > > >
> > > > --
> > > > Coco mailing list
> > > > Coco at maltedmedia.com
> > > > https://pairlist5.pair.net/mailman/listinfo/coco
> > > >
> > >
> > >
> > > --
> > > Coco mailing list
> > > Coco at maltedmedia.com
> > > https://pairlist5.pair.net/mailman/listinfo/coco
> > >
> >
> > --
> > Coco mailing list
> > Coco at maltedmedia.com
> > https://pairlist5.pair.net/mailman/listinfo/coco
> >
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
More information about the Coco
mailing list