Yes! I haven't used FORTRAN in decades now either, but I can verify that I did exactly that in college when I was first learning "FORTRAN IV", or maybe it was the faster "WATFIV", but I passed a 2 to a subroutine and and it changed it for the rest of the program.
On Mon, Feb 12, 2018 at 4:56 AM, Martin Ward <mar...@gkc.org.uk> wrote: > On 11/02/18 20:48, Paul Gilmartin wrote: > >> IBM FORTRAN, for example, passes everything by reference (think CALL >> macro). >> (But my experience may be many decades outdated.) >> > > At least one early FORTRAN compiler passed everything by reference. > If you passed the number 3, the subroutine received the address > in the literal table where the number 3 was stored, and could > assign a new value to it. From that point on, any references > to the literal number 3 in the program would get the new value! > > > -- > Martin > > Dr Martin Ward | Email: mar...@gkc.org.uk | http://www.gkc.org.uk > G.K.Chesterton site: http://www.gkc.org.uk/gkc | Erdos number: 4 >