[Info-vax] Fortran problem with QIO

Heuser vaxinf at chemie.uni-konstanz.de
Tue Dec 8 09:33:59 EST 2009


On 7 Dez., 19:54, Ken Fairfield <ken.fairfi... at gmail.com> wrote:
> On Dec 7, 10:31 am, glen herrmannsfeldt <g... at ugcs.caltech.edu> wrote:
>
> > Ken Fairfield <ken.fairfi... at gmail.com> wrote:
>
> > (snip)
>
> > > To the OP, you need to know that VAX Fortran
> > > passes most arguments by reference (address),
> > > with the exception of CHARACTER variables,
> > > which are always passed by descriptor (as
> > > noted by other posters).
>
> > As I understand it, CHARACTER variables are passed by
> > descriptor, as you say.  At LINK time, is the dummy argument
> > is not CHARACTER it is converted from descriptor to reference
> > form, allowing Fortran 66 style calls where the actual argument
> > is another type, such as INTEGER.
>
> First, apologies for my post-in-haste...a bunch of typos there lay!
>
> One being "VAX" Fortran, when I really meant VMS Fortran.
> But that doesn't much matter.   The linker on VAX did fix up
> these old F66-style argument mismatches.  However, that
> "feature", which was really an extension to help with IBM Fortran
> compatibility and to allow old (wrong) code to compile.  It was
> *dropped* with the port to Alpha (and Integrity), as well as in
> the new F90 compiler.
>
> In any case, it's irrelevant to the present discussion since
> we're talking about calling VMS system services.  The
> system services are very picking about arguments being
> passed by the documented mechanism.  If you can't read
> the documentation and call the routine correctly, you've no
> business using the system services (directly). :-)
>
>    -Ken

One remark:
The Itanium fortran compiler has a switch /BY_REF_CALL
that changes the addessing mode for character variables.

Eberhard



More information about the Info-vax mailing list