Subject:
|
Re: identifiers in NQC
|
Newsgroups:
|
lugnet.robotics.rcx.nqc
|
Date:
|
Tue, 25 Jan 2000 07:08:10 GMT
|
Viewed:
|
2128 times
|
| |
| |
In article <Foutrv.HsJ@lugnet.com>, "Mike Burger" <mike@hawaii.edu>
wrote:
> Usually there is some compiler rule that states:
>
> identifiers must be unique within the first _____ characters.
>
> That is, long variable and other identifier names may be allowed to be
> quite long, but they must be unique somewhere in the first X number of
> letters.
>
> lastlightstate
> lastlightstatelock
>
> for instance.
>
> What is this number for NQC?
There isn't any practical limit - symbol storage is allocated
dynamically and the lexer grows its buffer as needed, so identifiers may
be as long as you want (until you run out of memory) and every character
is significant.
This isn't the most efficient way to do things performance-wise, but NQC
programs are so small it doesn't matter.
> I have seen C complilers range from 8 to 30 characters for this.
I believe ANSI C mandates a minimum of 31 characters for internal
linkage within a compile unit (and things like #defines), but only 6 for
external linkage.
Dave Baum
--
reply to: dbaum at enteract dot com
|
|
Message is in Reply To:
| | identifiers in NQC
|
| Usually there is some compiler rule that states: identifiers must be unique within the first _____ characters. That is, long variable and other identifier names may be allowed to be quite long, but they must be unique somewhere in the first X number (...) (25 years ago, 24-Jan-00, to lugnet.robotics.rcx.nqc)
|
2 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|