Erik Hofman wrote:
> At first I was thinking using #'A' since # represents a number
> already in most cases, but then again; how about just using a
> new function?
Just to be clear, there is a function to do this already: strc()
returns the value of the Nth byte in a string. The index
defaults to
> From: Andy Ross
>
> Perl and Python get away without having character constants at all.
> They do string indexing by making substrings at runtime. But
> substrings are garbage-collected, which makes them a little expensive.
> I don't want to thrash the heap just to iterate through a single
>
Andy Ross wrote
> So anyway, which of the following are good/bad choices for a character
> constant syntax:
>
>`A` @A $A %A &A @"A" $"A" %"A" &"A" c"A"
Anything but `A` - I'm bound to misread that in the future sometime. I
favour a function.
Regards,
Vivian
_
Andy Ross wrote:
More not-quite-FlightGear subject matter ahead. But I need advice:
Nasal needs a "character constant" syntax. That is, the ability to
write an ASCII charactrer as a numerical constant. In C/C++, you use
single quotes to do this (e.g. the token 'A' is just a synonym for the
integ
More not-quite-FlightGear subject matter ahead. But I need advice:
Nasal needs a "character constant" syntax. That is, the ability to
write an ASCII charactrer as a numerical constant. In C/C++, you use
single quotes to do this (e.g. the token 'A' is just a synonym for the
integer value 65).