3 ms·
I found this remark: https://www.cs.fsu.edu/~lacher/courses/COT4401/notes/cise_v2_i1/fortran.pdf https://www.cs.fsu.edu/~lacher/courses/COT4401/notes/cise_v2...
by mamcx 11y ago
I found this remark:
https://www.cs.fsu.edu/~lacher/courses/COT4401/notes/cise_v2_i1/fortran.pdf https://www.cs.fsu.edu/~lacher/courses/COT4401/notes/cise_v2...
The Fortran I compiler would expand each
operator with a sequence of parentheses. In a
simplified form of the algorithm, it would
• replace + and – with ))+(( and ))-((,
respectively;
• replace * and / with )*( and )/(, respectively;
• add (( at the beginning of each expression
and after each left parenthesis in the original
expression; and
• add )) at the end of the expression and before
each right parenthesis in the original
expression.
This is the first time I hear about this, this technique will work with today compilers vs. most others like precedence climb?