3 ms·
I haven't heard of that, and it would be great if you could remember where you found it. It sounds to me like it might be an apocryphal corruption of the follow
by kps 13y ago
I haven't heard of that, and it would be great if you could remember where you found it. It sounds to me like it might be an apocryphal corruption of the following:
Fortran passes arguments by reference. If the compiler uses a constant pool, and (lazily or efficiently, depending on your point of view) passes the constant pool location as an argument, a subroutine could inadvertently modify a constant.
FORTRAN 66 (the first ANSI standard) and FORTRAN 77 forbid passing a constant or expression as an argument that will be modified†‡, thereby blessing this implementation. (Fortran 90 and later are tl;dr.)
† http://www.fh-jena.de/~kleine/history/languages/ansi-x3dot9-1966-Fortran66.pdf http://www.fh-jena.de/~kleine/history/languages/ansi-x3dot9-... §8.4 p26
‡ http://www.fortran.com/fortran/F77_std/rjcnf-15.html#sh-15.9.2 http://www.fortran.com/fortran/F77_std/rjcnf-15.html#sh-15.9...
- bodyfour 13y agoIt's a war story from my father, so I have to admit that the details could be corrupted. He worked with a variety of machines in the 60s, so it was believable that one had a permissive enough FORTRAN to allow that. It's also possible that your explanation of it being reference-argument corruption. I'm almost curious enough to fire up a PDP-8 emulator and see what 4K FORTRAN does. Almost. http://techtinkering.com/2009/07/14/running-4k-fortran-on-a-dec-pdp8 http://techtinkering.com/2009/07/14/running-4k-fortran-on-a-...