Comment by bregma
6 days ago
FORTRAN had both functions and subroutines. A function returned a value and was invoked in an expression (eg. S=SIN(A)). A subroutine was invoked by calling it (eg. CALL FOPEN(FNAME, PERMS)).
6 days ago
FORTRAN had both functions and subroutines. A function returned a value and was invoked in an expression (eg. S=SIN(A)). A subroutine was invoked by calling it (eg. CALL FOPEN(FNAME, PERMS)).
I should probably just Google this, but how did you define the functions?
FORTRAN also had single-expression function definitions, e.g.
Naturally this is syntactically identical to an array element assignment, which is one of the many things that made compiling FORTRAN so much fun.
4 replies →