* Length limit for variable names in your language?
@ 2001-05-13 10:24 No Na Me
2001-05-13 14:57 ` Larry Kilgallen
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: No Na Me @ 2001-05-13 10:24 UTC (permalink / raw)
What this limit is for
C++,Fortran,Lisp,Pascal etcetcetc ?
Since this is multi-newsggroups message
please do not forget to mention the language :-)
Thanks
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Length limit for variable names in your language?
2001-05-13 10:24 Length limit for variable names in your language? No Na Me
@ 2001-05-13 14:57 ` Larry Kilgallen
2001-05-15 5:42 ` Mark Yudkin
2001-05-13 17:51 ` Edward Rosten
2001-05-13 17:55 ` Tim Tyler
2 siblings, 1 reply; 9+ messages in thread
From: Larry Kilgallen @ 2001-05-13 14:57 UTC (permalink / raw)
In article <3AFE60D8.6C3282B7@my-deja.com>, No Na Me <No_Na_Me@my-deja.com> writes:
> What this limit is for
> C++,Fortran,Lisp,Pascal etcetcetc ?
Section 2.2 of the Ada95 Language Reference Manual says that any
conforming compiler must support lexical elements of at least 200
characters in length.
Individual compilers are free to support more, but that caused me
pain when I tried to move a (mechanically generated) program from
a compiler that supported more than 200 character identifiers (an
Ada83 compiler, actually) to a compiler that set the limit at 200.
My mechanical program generation had some identifiers longer than
200 characters (to preserve information from which the program was
generated).
==============================================================================
Great Inventors of our time: Al Gore -> Internet; Sun Microsystems -> Clusters
==============================================================================
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Length limit for variable names in your language?
2001-05-13 10:24 Length limit for variable names in your language? No Na Me
2001-05-13 14:57 ` Larry Kilgallen
@ 2001-05-13 17:51 ` Edward Rosten
2001-05-14 2:19 ` Cesar Rabak
2001-05-13 17:55 ` Tim Tyler
2 siblings, 1 reply; 9+ messages in thread
From: Edward Rosten @ 2001-05-13 17:51 UTC (permalink / raw)
> What this limit is for C++,Fortran,Lisp,Pascal etcetcetc ?
According to K&R 2nd edition, C guarntees that at least the first 31
characters of an internal name are significant. The standard guarntees 6
monocase characters for external identifiers, minimum.
-Ed
> Since this is multi-newsggroups message please do not forget to mention
> the language :-) Thanks
--
You can't go wrong with psycho-rats.
u 9 8 e j r (at) e c s . o x . a c . u k
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Length limit for variable names in your language?
2001-05-13 10:24 Length limit for variable names in your language? No Na Me
2001-05-13 14:57 ` Larry Kilgallen
2001-05-13 17:51 ` Edward Rosten
@ 2001-05-13 17:55 ` Tim Tyler
2 siblings, 0 replies; 9+ messages in thread
From: Tim Tyler @ 2001-05-13 17:55 UTC (permalink / raw)
Java - from the end of:
http://java.sun.com/docs/books/vmspec/html/ClassFile.doc.html
``The amount of code per method is limited to 65535 bytes by the sizes of
the indices in the exception_table of the Code attribute (�4.7.4), in
the LineNumberTable attribute (�4.7.6), and in the LocalVariableTable
attribute (�4.7.7).''
I believe this is the major limitation that might reflect on
the maximum length of local variable names in Java bytecode.
I can't find any maximum limit on the length of static variables - this
might in principle depend on the availablility of memory.
Since these limits are in the VM specification - and no limits appear to
be specified in the language specification - a compiler may be at liberty
to rename private variables to avoid the issue.
--
__________ http://rockz.co.uk/ http://alife.co.uk/ http://hex.org.uk/
|im |yler http://atoms.org.uk/ http://mandala.co.uk/ tt@iname.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Length limit for variable names in your language?
2001-05-13 17:51 ` Edward Rosten
@ 2001-05-14 2:19 ` Cesar Rabak
2001-05-14 9:01 ` Edward Rosten
2001-05-15 0:16 ` Rev. Bob 'Bob' Crispen
0 siblings, 2 replies; 9+ messages in thread
From: Cesar Rabak @ 2001-05-14 2:19 UTC (permalink / raw)
Edward Rosten wrote:
>
> > What this limit is for C++,Fortran,Lisp,Pascal etcetcetc ?
>
> According to K&R 2nd edition, C guarntees that at least the first 31
> characters of an internal name are significant. The standard guarntees 6
> monocase characters for external identifiers, minimum.
>
> -Ed
The present standard (a.k.a. C99) changes this to:
-- 63 significant initial characters in an internal
identifier or a macro name (each universal character
name or extended source character is considered a
single character)
-- 31 significant initial characters in an external
identifier (each universal character name specifying a
character short identifier of 0000FFFF or less is
considered 6 characters, each universal character name
specifying a character short identifier of 00010000 or
more is considered 10 characters, and each extended
source character is considered the same number of
characters as the corresponding universal character
name, if any)
Since presently no C compiler is 100% compliant to the standard, YMMV.
HTH
Cesar
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Length limit for variable names in your language?
2001-05-14 2:19 ` Cesar Rabak
@ 2001-05-14 9:01 ` Edward Rosten
2001-05-14 13:36 ` Larry Kilgallen
2001-05-15 0:16 ` Rev. Bob 'Bob' Crispen
1 sibling, 1 reply; 9+ messages in thread
From: Edward Rosten @ 2001-05-14 9:01 UTC (permalink / raw)
In article <3AFF40AF.C7FB3D9C@uol.com.br>, "Cesar Rabak"
<csrabak@uol.com.br> wrote:
> Edward Rosten wrote:
>>
>> > What this limit is for C++,Fortran,Lisp,Pascal etcetcetc ?
>>
>> According to K&R 2nd edition, C guarntees that at least the first 31
>> characters of an internal name are significant. The standard guarntees
>> 6 monocase characters for external identifiers, minimum.
>>
>> -Ed
>
> The present standard (a.k.a. C99) changes this to:
I was referring to the C89(?) standard. C89 compliant (or nearly)
compilers are still much more common. However things depending on
external linkage are really at the mercy of the linker and library
software opn the host system.
-ed
--
You can't go wrong with psycho-rats.
u 9 8 e j r (at) e c s . o x . a c . u k
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Length limit for variable names in your language?
2001-05-14 9:01 ` Edward Rosten
@ 2001-05-14 13:36 ` Larry Kilgallen
0 siblings, 0 replies; 9+ messages in thread
From: Larry Kilgallen @ 2001-05-14 13:36 UTC (permalink / raw)
In article <9do3c2$2e$1@news.ox.ac.uk>, "Edward Rosten" <look@my.sig> writes:
> In article <3AFF40AF.C7FB3D9C@uol.com.br>, "Cesar Rabak"
> <csrabak@uol.com.br> wrote:
>
>> Edward Rosten wrote:
>>>
>>> > What this limit is for C++,Fortran,Lisp,Pascal etcetcetc ?
>>>
>>> According to K&R 2nd edition, C guarntees that at least the first 31
>>> characters of an internal name are significant. The standard guarntees
>>> 6 monocase characters for external identifiers, minimum.
>>>
>>> -Ed
>>
>> The present standard (a.k.a. C99) changes this to:
>
> I was referring to the C89(?) standard. C89 compliant (or nearly)
> compilers are still much more common. However things depending on
> external linkage are really at the mercy of the linker and library
> software opn the host system.
In order to meet the Ada length requirements, the Compaq Ada compiler
uses another mechanism that the linker for connections between Ada
modules, using the normal linker mechanism to implement that other
mechanism. Thus there is no degradation of name length between Ada
modules.
I presume other Ada compilers do something similar, but I am less
familiar with the linking mechanisms in those cases. Supporting
the full length of identifiers with all characters significant is
a guarantee that is important to Ada programmers, as is portability
between various implementations.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Length limit for variable names in your language?
2001-05-14 2:19 ` Cesar Rabak
2001-05-14 9:01 ` Edward Rosten
@ 2001-05-15 0:16 ` Rev. Bob 'Bob' Crispen
1 sibling, 0 replies; 9+ messages in thread
From: Rev. Bob 'Bob' Crispen @ 2001-05-15 0:16 UTC (permalink / raw)
If y'all promise to take comp.lang.vrml off the followups (fascinating
though the topic is), I'll give you the skinny on VRML symbolic names:
VRML browsers are required to support up to 50 utf8 octets for symbolic
names for PROTOs, DEFs, and fields (the only place they apply). Ref:
ISO/IEC-14772-1:1997, Clause 7.3.3.
Although VRML files can inline other VRML files, each file has its own
namespace, so linker considerations don't apply, since the language is
neither compiled nor linked.
ECMAScript scripts inside VRML files follow ECMA-262, which requires
symbolic names to be of "unlimited" length. Ref: ECMA-262, Clause 7.5.
--
Rev. Bob "Bob" Crispen
crispen at hiwaay dot net
Am I getting smart with you? ....How would you know?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Length limit for variable names in your language?
2001-05-13 14:57 ` Larry Kilgallen
@ 2001-05-15 5:42 ` Mark Yudkin
0 siblings, 0 replies; 9+ messages in thread
From: Mark Yudkin @ 2001-05-15 5:42 UTC (permalink / raw)
IBM OS PL/I: 31
IBM VA PL/I: 100
"Larry Kilgallen" <Kilgallen@eisner.decus.org.nospam> wrote in message
news:WQs7DB0rYxJ6@eisner.encompasserve.org...
> In article <3AFE60D8.6C3282B7@my-deja.com>, No Na Me
<No_Na_Me@my-deja.com> writes:
> > What this limit is for
> > C++,Fortran,Lisp,Pascal etcetcetc ?
>
> Section 2.2 of the Ada95 Language Reference Manual says that any
> conforming compiler must support lexical elements of at least 200
> characters in length.
>
> Individual compilers are free to support more, but that caused me
> pain when I tried to move a (mechanically generated) program from
> a compiler that supported more than 200 character identifiers (an
> Ada83 compiler, actually) to a compiler that set the limit at 200.
> My mechanical program generation had some identifiers longer than
> 200 characters (to preserve information from which the program was
> generated).
>
>
============================================================================
==
> Great Inventors of our time: Al Gore -> Internet; Sun Microsystems ->
Clusters
>
============================================================================
==
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2001-05-15 5:42 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-13 10:24 Length limit for variable names in your language? No Na Me
2001-05-13 14:57 ` Larry Kilgallen
2001-05-15 5:42 ` Mark Yudkin
2001-05-13 17:51 ` Edward Rosten
2001-05-14 2:19 ` Cesar Rabak
2001-05-14 9:01 ` Edward Rosten
2001-05-14 13:36 ` Larry Kilgallen
2001-05-15 0:16 ` Rev. Bob 'Bob' Crispen
2001-05-13 17:55 ` Tim Tyler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox