6 ms·
The pinnacle... huh. What about assigned goto? hollerith?equivalence? Please look at the following: C THE CALLEE SUBROUTINE X(I) GO TO I END C THE CALLER
by ratboy666 3y ago
The pinnacle... huh.
What about assigned goto? hollerith?equivalence? Please look at the following:
C THE CALLEE
SUBROUTINE X(I)
GO TO I
END
C THE CALLER
ASSIGN 10 TO J
CALL X(J)
C THIS IS NEVER REACHED
STOP
10 WRITE(3,100)
100 FORMAT(8H THIS IS)
END
Why would this work? Because recursive calls are not allowed, There should NOT be a stack. So allow rather arbitrary jumped around (setjmp/longjmp) is um... ok?!? And what happens if a normal integer is passed to that code? (and it is separately compiled). Yikes.
- Koshkin 3y agoOr, with proper formatting: C THE CALLEE SUBROUTINE X(I) GO TO I END C THE CALLER ASSIGN 10 TO J CALL X(J) C THIS IS NEVER REACHED STOP 10 WRITE(3,100) 100 FORMAT(8H THIS IS) END