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

glen herrmannsfeldt gah at ugcs.caltech.edu
Mon Apr 22 17:40:56 EDT 2013


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?
 
> 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. 

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

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.

-- glen



More information about the Info-vax mailing list