[comp.lang.fortran] FORTRAN symbolic name length implementation limits

ciemo@bananapc.SGI.COM (Dave Ciemiewicz) (03/29/89)

Awhile back, I posted a request to comp.lang.fortran for
information regarding the implementation limits of symbolic
namers for various FORTRAN compilers.


According to ANSI Standard X3.9-1978 for FORTRAN 77, section 18
"Scope and Classes of Symbolic Names":

	A symbolic name consists of one to six alphanumeric
 	characters, the first of which must be a letter.

Many FORTRAN 77 compiler implementations permit symbolic names
which are longer than six characters.


I received a number of responses to the posting. I have compiled the
information into the table below.  I make no guarantees or warranties
about the information in the table -- the data was gotten from an
informal survey so it may contain some errors.


I would like to thank everyone who provided me with information.


   COMPILER:PLATFORMS    |    LIMITS     |       IF EXCEEDS LIMIT/REMARKS
=========================+===============+=====================================
MIPS FORTRAN:            |            32 | error & trunc to 32 chars
MIPS Computer Systems,   |               | (unrunnable)
Silicon Graphics IRIS-4D |               |
-------------------------+---------------+-------------------------------------
VMS FORTRAN:             |            31 | warning & trunc to 31 chars
DEC VAX VAX/VMS          |               |
-------------------------+---------------+-------------------------------------
f77:                     |            16 | fatal error
DEC VAX BSD Unix         |               |
-------------------------+---------------+-------------------------------------
FORTRAN:                 |    idents: 42 |
Convex                   |    x-ref:  31 |
-------------------------+---------------+-------------------------------------
f77:                     |          2048 | Statements are limited to 1320 chars
ELXSI Unix               |               | so this is the effective limit.
-------------------------+---------------+-------------------------------------
Thinking Machines        |            31 |
Connection Machine       |               |
-------------------------+---------------+-------------------------------------
CFT:                     |             8 | fatal error
Cray X-MP/14 UNICOS      |               |
-------------------------+---------------+-------------------------------------
CFT77:                   | internals: 31 | fatal error
Cray X-MP/14 UNICOS      | externals:  8 | fatal error
-------------------------+---------------+-------------------------------------
APFTN64:                 |             8 |
Floating Point Systems   |               |
-------------------------+---------------+-------------------------------------
FORTRAN:                 |             8 | Must be all uppercase
CDC Cyber 205 VSOS,      |               |
ETA10/ETA10p VSOS        |               |
-------------------------+---------------+-------------------------------------
VS FORTRAN:              | variables: 31 | error & trunc to 31 chars (runnable)
IBM 3090 VM/CMS          | externals:  7 | chop middle, no message (See NOTE)
-------------------------+---------------+-------------------------------------
FORTRAN-PLUS:            |         32/30 |
AMT DAPs                 |               |
-------------------------+---------------+-------------------------------------

NOTE: The IBM VS FORTRAN (IMHO) does the most bizarre thing with
external identifiers.  External symbolic names are truncated to
31 characters (if they are longer than 31 characters) then the
first four characters and the last three characters of the name
are used to create a seven character identifier.  For example
the symbolic name THISISNOTBAD would be converted to THISBAD.
Go figure.
--

Dave	   (commonplace)		"Boldly going where no one cares to go."
Ciemiewicz (incomprehensible)
ciemo 	   (infamous)

kahn@batcomputer.tn.cornell.edu (Shahin Kahn) (04/02/89)

In article <29585@sgi.SGI.COM> ciemo@bananapc.SGI.COM (Dave Ciemiewicz) writes:

  ...  deleted lines

>   COMPILER:PLATFORMS    |    LIMITS     |       IF EXCEEDS LIMIT/REMARKS
>APFTN64:                 |             8 |
                                --------^
   It's 32 characters.

>Floating Point Systems   |               |