realbasic-plugins
[Top] [All Lists]

Re: Define constants, my experience for this list...

To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>
Subject: Re: Define constants, my experience for this list...
From: "Theodore H. Smith" <delete at elfdata dot com>
Date: Sat, 17 Dec 2005 13:47:17 +0000
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
References: <S dot 0000917704 at mail dot tempel dot org> <43A40D29 dot 20107 at rovosoft dot com>

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>


<Prev in Thread] Current Thread [Next in Thread>