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
integer value 65).

   (Brief background: I just added the ability to read and write
   individual bytes in a string with the [] operator, just like you
   can for elements of the vector.  Thus the need for character
   constants to which to compare those bytes.)

But Nasal can't do that, because it already uses single quotes for
unescaped strings, something that will be really useful in the regular
expression interface I am putting together.

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?


Flightgear-devel mailing list

Reply via email to