[Info-vax] GCC for VMS, was: Re: fortran compiler roadmap?

Johnny Billquist bqt at softjar.se
Mon Apr 22 17:45:47 EDT 2013


On 2013-04-22 23:40, glen herrmannsfeldt wrote:
> Johnny Billquist <bqt at softjar.se> wrote:
>
> (snip, someone wrote)
>>>      IIRC, Fortran-IV-Plus on RSX was pretty much the same, except with
>>>      built-in funtions instead of %LOC and %VAL, and even the Fortran-77
>>>      for RSX compiler didn't meet the standard with respect to using
>>>      LEN on passed CHARACTER arguments.
>
>> I thought the F4P on VMS was just the RSX compiler straight off. I
>> thought it ran in compatibility mode.
>
> But generating VAX code, or not?

I thought not. But I might be wrong... I never used F4P on VMS. Only on 
RSX...

>> Not sure what the standard says, but I've been bitten when moving code
>> from VMS to RSX with regards to the LEN function. In RSX, LEN will give
>> the size of the variable. Strings don't have dynamic length. And I'm not
>> sure I understand how that was meant to work. If you say CHARACTER*80
>> FOO, and the do a LEN(FOO), returning 80 seems pretty reasonable (no
>> matter what stuff you have assigned to FOO).
>
> Fortran 77 still doesn't to any dynamic allocation. But a function
> argument, passed by reference, can have a length.

Right. And F77 under RSX handles that, if I remember right.

> The complication is that Fortran 66 stores character data in numeric
> (usually INTEGER) variables, and those can also be passed to functions.

Same with Fortran IV... I was pretty used to storing strings in integer 
arrays...

> CHARACTER are passed by descriptor (for VAX), and INTEGER by reference.
> The linker fixed up the case where a CHARACTER (at least constant
> if not variable) is passed to an INTEGER (or array of) argument.

I also seem to remember that strings in Fortran 77 under VMS could 
actually be dynamic in length, but I might be remembering wrong. Too 
long since I worked on that.

	Johnny




More information about the Info-vax mailing list