1

When using the Minitran language (used by Monash University in Australia to teach Fortran in around 1970) how do you ask for trigonometric functions like Sin, Cos, Tan, Log, Sqrt, etc?

The cards with which you submit your programs are like this:

Minitran card

Note that the only alphabetic characters you can "punch" out (with a paper clip) are A, B, I, J and F (F is on the bottom-right of each column).

Are these functions called by using (say) F1 (for Sin), F2 (for Cos) or what? And if so, what is the mapping of function numbers to the underlying functions?


Arithmetic if

I wonder what did they use for logical operators?

I worked that bit out with a bit of prompting from a friend who did the same course.

https://www.fortran.com/F77_std/rjcnf-11.html

11.4 Arithmetic IF Statement The form of an arithmetic IF statement is:

  IF (e) s1, s2, s3

where:

e is an integer, real, or double precision expression

s1, s2, and s3 are each the statement label of an executable statement that appears in the same program unit as the arithmetic IF statement. The same statement label may appear more than once in the same arithmetic IF statement.

Execution of an arithmetic IF statement causes evaluation of the expression e followed by a transfer of control. The statement identified by s1, s2, or s3 is executed next as the value of e is less than zero, equal to zero, or greater than zero, respectively.

Nick Gammon
  • 1,173
  • 10
  • 22
  • At first I answered that you couldn't but then a few brain cells came back to life and I remembered that implementing built in functions was as you guessed, F1, F2, etc. I can't remember which were which though. – RussF Apr 01 '16 at 02:33
  • I wonder what did they use for logical operators? – agentp Apr 01 '16 at 04:12
  • Good question! I can see `=` there but no `<` or `>`. – Nick Gammon Apr 01 '16 at 05:20
  • @agentp - possibly using something like this? `IF(100,200,300)A` meaning `IF(A<0)GOTO 100`, `IF(A=0)GOTO 200`, `IF(A>0)GOTO 300`. Sound plausible? – Nick Gammon Apr 01 '16 at 19:57
  • I worked it out - the "Arithmetic IF" - see amended question. – Nick Gammon Apr 01 '16 at 20:04

1 Answers1

2

I was fortunately able to contact Dr. Len Whitehouse who wrote the Minitran language. He confirmed that Fn(parameter) was the method of calling functions, where:

n = 1 for SIN
    2 for COS
    3 for ATAN
    4 for SQRT
    5 for ALOG
    6 for EXP
    7 for ABS
    8 for RAN
    9 for PLOT

The parameter is a real constant or a real simple variable.


Also, variables were strings of alphabetic and numeric characters (from which you had A, B, I, J to choose from), the first of which must be alphabetic. Only the first four characters of a name were significant. Normal integer-real rules apply, which I assume to mean variables starting with A, B are real and I, J are integers.

Nick Gammon
  • 1,173
  • 10
  • 22