Re: Was there a negative real zero possibility in early Fortran?



Gordon Sande wrote:

As I recall it, a function ending in F had its one arguement passed in the
accumulator while other functions took an arguement list of the usual form.

As far as I know it, Fortran I used the F and length range to determine
if a name was an array or function. There were no user supplied functions
(no FUNCTION statement).

Fortran II added FUNCTION, SUBROUTINE, and COMMON. It looks like
function names aren't restricted, but the system tape library
functions kept the old names.

I do not recall any discussion of multiple argument functions with names
ending in F. The rule was quite simple and effective so I would guess that
the "mixed" case was not permitted. The CDC6000s were another story with
early arguements in registers and later ones in memory.

From the previously mentioned PDF:

"The FORTRAN II Translator distinguishes a function name with a
parenthesized list of arguments from a subscripted variable by
examining the DIMENSION statements in the program. A subscripted
variable must be listed in a DIMENSION statement, and a function
name must not be so listed. Having determined that an
alphanumeric symbol is a function name, the Translator determines
the type of function by examining the characters used to specify
the function."

"1. A built-in function is specified by a name which is uniquely
reserved for it and listed in a dictionary on the system tape.

"2. A library tape function is specified by its name with a
terminal F added. With the terminal F added, the name consists
of 4 to 7 alphabetic or numeric characters, of which the first
is alphabetic and the last is F. Also, the first must be X if
and only if the value of the function is to be fixed point."

"3. A function defined by an arithmetic statement (function
definition) is specified by the name on the left side of the
function definition. This name is not distinct in from from a
library function name, but is recognized because of its
previous occurrence in a function definition."

"4. A function defined by a FUNCTION subprogram is specified
by a name which is formally distinct from the names of other
types of functions. This name consists of 1 to 6 alphabetic
or numeric characters, the first character must be I, J, K,
L, M, or N if and only if the value of the function is to be
fixed point, and the last character must not be F if the
the total number of characters is 4 or more."


So, the built-in (system tape) functions kept their F, but
those from a FUNCTION subprogram did not, and it seems must not
have the F if they are 4 to 7 characters long.

Then by Fortran IV (more or less Fortran 66) the strange F
convention was gone.

The convention may have been used to supply a different
calling convention. Note, though, that MAX1F takes
multiple arguments and has the F.

-- glen












.



Relevant Pages