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 <> 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: |
> G.K.Chesterton site: | Erdos number: 4

Reply via email to