Talk:Short-circuit evaluation: Difference between revisions

→‎Compiler optimisations?: added a comment about there being at least two FORTRAN II compilers for the IBM 1620.
(→‎Compiler optimisations?: added a comment about there being at least two FORTRAN II compilers for the IBM 1620.)
 
Line 97:
 
::Ahem. I've done that too, and with intent. The IBM1620's Fortran II compiler allowed only simple expressions for array indexing, (''const''*''variable'' +- ''constant'') and I wanted (I + J) inside a READ statement's list and there was some reason why I couldn't use an implicit DO-loop as in (A(K),K = I + J,...) or similar. Anyway, as you will have guessed, I found I could write A(J + 12345) after calling subroutine ZAP(12345,I) and suddenly, the storage set aside to hold the constant would contain ... something else. This would not work for simple constants such as zero that on some systems might be developed by in-line code. Naturally, there must be no other usage of a constant 12345 that expects it to have its proper value. On the IBM1130 this would ''not'' work, because although the constant would be damaged, constant offsets in array indexing were merged with the base address of the array and so vanished at run time. And anyway, array indexing now allowed arbitrary expressions. [[User:Dinosaur|Dinosaur]] ([[User talk:Dinosaur|talk]]) 03:34, 7 June 2017 (UTC)
 
::: There were (at least) two Fortran II compilers for the IBM 1620.   One was written by IBM, the other was a one-pass compiler and written by Dr. D. G. Robinson, D. A. Jardine (and others) of DuPont of Canada.   Locally, we called it Fortran 2.5 and it had a lot of Fortran IV features.   It allowed almost any expression for array indexing.     -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 07:50, 3 January 2019 (UTC)