Next |
The Identity Function |
26 |
C THIS DECLARES THAT A IS AN ARRAY WITH 1 ELEMENT IDF0010
INTEGER A(1) IDF0020
IDF0030
FOO = 17 IDF0040
IDF0050
C I AM ANALOGOUS TO PTR = &FOO IN C IDF0060
PTR = IADDR(FOO) IDF0070
IDF0080
C I AM ANALOGOUS TO BAR = *PTR IN C IDF0090
OFFSET = (PTR-IADDR(A))/4 + 1 IDF0100
BAR = A(OFFSET) IDF0110
IDF0120
C ANYWAY THE KEY FEATURE HERE IS IADDR IDF0130
C WHICH IS NOTHING MORE THAN THE IDENTITY FUNCTION IDF0140
C IMPLEMENTED IN SYSTEM/370 ASSEMBLY LANGUAGE IDF0150
IDF0160
C NOTE THAT THIS ALL DEPENDS ON THE FACT IDF0170
C THAT FORTRAN IS NOT DOING ANY ARRAY BOUNDS CHECKING IDF0180
IDF0190
C GOD HOW I LOVE FORTRAN IDF0200
IDF0210
C PLEASE KILL ME NOW IDF0220
END IDF0230
Next |
|
Copyright © 2001 M. J. Dominus |