On 17 Dec 2005, at 13:05, Ronald Vogelaar wrote:
Thomas Tempelmann wrote:
Marco Bambini wrote:
IDE gives a "Cannot compile a constant with no name" error for
every constant that begins with a number, for example:
{"2_BYTES = &h1407", NULL, 0},
{"3_BYTES = &h1408", NULL, 0},
{"4_BYTES = &h1409", NULL, 0},
Shouldn't we all know that RB requires identifiers to begin with a
letter?
Am I the only one who tends to find this somewhat limiting? I had
to remind myself of this quite often. I got around by using Chinese
characters in those cases where I would have started the name of a
method or property with a number. RB handles this quite nicely.
Of course, I could just have just used i.e. "three_bytes", but I
like the brevity of "三_bytes" (I hope that comes through to the
list though).
So now we can use these names in our code too!:
Réturn
Øbject
Cläss
I can imagine all sorts of problems this would lead to :D
I generally prefer constants to start with "k".
One cool idea though is for mathematical constants. Having the
constant π (pi) being defined would be very nice._______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|