From: Gary Scott on
Terence wrote:
> Short comment on Gary's note on:-
>
>
>>>>It wasn't so easy in the days of 6-character name length limits.
>>
>>I tend to agree in that I never had much difficulty with 6 character
>>names because there was considerable discipline used in the naming
>>conventions we used.
>
>
> My memory is that at least one of the earlier Fortran compilers I
> worked with allowed SIX-letter variable names only in the main program.
> And FIVE-letter names as variables in subroutines and functions.
> Although I learned Fortran in the early sixties, I seem to think this
> rule caught my attention working with IBM main-frames compilers,
> Hewlett-Packard and Modcomp minicomputers (and their fortran compilers)
> all at the same time in the seventies .
> So maybe one of these had the quirk and I learned to play safe. So to
> this day I have the fixed habit of using FIVE letters only for
> variables (and fixed format).
>
> And surely a suffix ".f" (which I saw as advice to someone in this
> forum) is equivalent to the normal ".for" to indicate a fixed-format
> program to an F90 compiler ?
>
That wouldn't apply to some OS though that don't have a concept of a
file name "suffix".

--

Gary Scott
mailto:garylscott(a)sbcglobal dot net

Fortran Library: http://www.fortranlib.com

Support the Original G95 Project: http://www.g95.org
-OR-
Support the GNU GFortran Project: http://gcc.gnu.org/fortran/index.html

Why are there two? God only knows.


If you want to do the impossible, don't hire an expert because he knows
it can't be done.

-- Henry Ford
From: William J. Leary Jr. on
"Terence" <tbwright(a)cantv.net> wrote in message
news:1161472385.953880.177910(a)m73g2000cwd.googlegroups.com...
> My memory is that at least one of the earlier Fortran compilers
> I worked with allowed SIX-letter variable names only in the main
> program.And FIVE-letter names as variables in subroutines and
> functions.

This sounds vaguely familiar to me. I used FORTRAN (when it was still all
uppercase) on DG, DEC and [[some other]] computers back in the late 70's and
early 80's. One of them, I can't recall which, had some limitation like that.
Specifically, some short length in the main program, and that length minus one
in either subroutines or separately compiled modules.

- Bill


From: glen herrmannsfeldt on
Brian Inglis wrote:

(snip on C, struct, and operators)

> And what would these operators mean applied to a struct?
> You need C++, but it's not intuitively obvious what those operators
> would mean, so using member functions with meaningful names would be
> more obvious e.g. zero_stuff, inc_stuff, add_stuff.

It took Fortran many years to add array operations, yet they
seem obvious once added. Initializing a whole array with as

A=0

seems obvious enough, why not initialize a whole structure
in a similar way? That would, of course, depend in the operation
making sense, in that the structure would have to contain only
elements where assigning 0 made sense.

Similarly,

A=B+C

now seems obvious for arrays, but not structures. Again, structures
containing elements where the + operator makes sense could easily
have this operation added.

I have previously described what PL/I will do with character variables
and numeric operations. It will do those with structures containing
such variables, too. I won't propose that Fortran should do that.

-- glen

From: glen herrmannsfeldt on
Gary Scott wrote:

(snip)

>> And surely a suffix ".f" (which I saw as advice to someone in this
>> forum) is equivalent to the normal ".for" to indicate a fixed-format
>> program to an F90 compiler ?

> That wouldn't apply to some OS though that don't have a concept of a
> file name "suffix".

Older DEC OSs, later adapted by DOS, had the suffix as part of the file
system. Some allowed for a six character file name and a three
character extension. For VAX/VMS the shortest possible file name is .;

For unix, it was convention to add a . suffix to names, but to the
system . was just another character. If . was not a legal character,
one could find another separator, or specify that the last character
of the name was the indicating suffix.

-- glen

From: glen herrmannsfeldt on
Terence wrote:
(snip)

> My memory is that at least one of the earlier Fortran compilers I
> worked with allowed SIX-letter variable names only in the main program.
> And FIVE-letter names as variables in subroutines and functions.

(snip)

For the first Fortran compiler, in the manual 50 years and one week old:

"The name of a function is 4 to 7 alphabetic or numeric characters,
(not special characters) of which the last must be F and the first
must be alphabetic. Also, the first must be X if and only if the
function is to be fixed point."

Also, "The name of a variable must not be the same as the name of
any function used in the program after the terminal F of the function
name has been removed. Also, if a subscripted variable has 4 or more
characters in its name, the last of these must not be an F."

Six letter names are especially convenient for 36 bit machines
using a six bit character set, or that internally adopt a six
bit character set for some names.

-- glen