Re: "USE" statement in Fortran - VMS

This is a discussion on Re: "USE" statement in Fortran - VMS ; From: =?ISO-8859-1?Q?Arne_Vajh=F8j?= > RLFitch wrote: > > If I try to compile some code that has a 'USE' statment the module > > file must be in the same directory as the program code. Is it > > possible to ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: Re: "USE" statement in Fortran

  1. Re: "USE" statement in Fortran

    From: =?ISO-8859-1?Q?Arne_Vajh=F8j?=

    > RLFitch wrote:
    > > If I try to compile some code that has a 'USE' statment the module
    > > file must be in the same directory as the program code. Is it
    > > possible to direct the 'USE' statment to use a file in some other
    > > directory?
    > > PROGRAM T
    > > USE MOD1
    > >
    > > write (*,6) 'test'
    > >
    > > END PROGRAM T
    > >
    > > $ fort t
    > >
    > > USE MOD1
    > > ....^
    > > %F90-E-ERROR, Error in opening the Library module file. [MOD1]
    > > at line number 2 in file USER:[RFITCH.DEV.DISLIN]T.F90;2

    >
    > /MODULE=dir
    >
    > maybe.


    Or /INCLUDE=(dir[,...]). See HELP FORTRAN /INCLUDE:

    [...]
    Specifies an additional directory for the HP Fortran compiler
    to search for module files or include files:

    o Module files are specified by a USE statement. The module
    files have a file type of F90$MOD and are created by the HP
    Fortran compiler.
    [...]


    (It's amazing how out-of-date my Fortran knowledge is.)

    ------------------------------------------------------------------------

    Steven M. Schweda sms@antinode-org
    382 South Warwick Street (+1) 651-699-9818
    Saint Paul MN 55105-2547

  2. Re: "USE" statement in Fortran

    On Jan 8, 11:28 pm, s...@antinode.org (Steven M. Schweda) wrote:

    > (It's amazing how out-of-date my Fortran knowledge is.)


    Where's Steven Lionel when you need him? ;-)

    Actually, where *is* Steven Lionel? It's been a long time....

    ok
    dpm

  3. Re: "USE" statement in Fortran

    On Jan 8, 9:28 pm, s...@antinode.org (Steven M. Schweda) wrote:
    > From: =?ISO-8859-1?Q?Arne_Vajh=F8j?=
    >
    >
    >
    > > RLFitch wrote:
    > > > If I try to compile some code that has a 'USE' statment the module
    > > > file must be in the same directory as the program code. Is it
    > > > possible to direct the 'USE' statment to use a file in some other
    > > > directory?
    > > > PROGRAM T
    > > > USE MOD1

    >
    > > > write (*,6) 'test'

    >
    > > > END PROGRAM T

    >
    > > > $ fort t

    >
    > > > USE MOD1
    > > > ....^
    > > > %F90-E-ERROR, Error in opening the Library module file. [MOD1]
    > > > at line number 2 in file USER:[RFITCH.DEV.DISLIN]T.F90;2

    >
    > > /MODULE=dir

    >
    > > maybe.

    >
    > Or /INCLUDE=(dir[,...]). See HELP FORTRAN /INCLUDE:
    >
    > [...]
    > Specifies an additional directory for the HP Fortran compiler
    > to search for module files or include files:
    >
    > o Module files are specified by a USE statement. The module
    > files have a file type of F90$MOD and are created by the HP
    > Fortran compiler.
    > [...]
    >
    > (It's amazing how out-of-date my Fortran knowledge is.)
    >
    > ------------------------------------------------------------------------
    >
    > Steven M. Schweda sms@antinode-org
    > 382 South Warwick Street (+1) 651-699-9818
    > Saint Paul MN 55105-2547


    Steven-

    Thanks very much. This worked quite well. Your "out-of-date" Fortran
    knowledge seems to be much better than my "current" (lol) knowledge.

    It still seems that this could be specified in the code. Armed with
    this, I will do some research in the manuals.

    Ransom Fitch

  4. Re: "USE" statement in Fortran

    On Jan 9, 5:24 am, David_Mur...@murphyfamily.org wrote:
    > On Jan 8, 11:28 pm, s...@antinode.org (Steven M. Schweda) wrote:
    >
    > > (It's amazing how out-of-date my Fortran knowledge is.)

    >
    > Where's Steven Lionel when you need him? ;-)
    >
    > Actually, where *is* Steven Lionel? It's been a long time....


    Steve L. hangs out in comp.lang.fortran, where else would
    you expect to find him? :-) :-) Well, on some of the Intel
    forums I suppose...

    To SMS: the current Fortran compiler on Alpha/VMS is a
    Fortran 95 compiler (a "bug-fix" release standard that corrected
    just a few things in F90). The current ISO standard is
    Fortran 2003 (although no fully compliant F2K3 compilers exist),
    and the next standard release, Fortran 2008, is getting close
    to public review, if I'm not mistaken. Unfortunately, there is
    no F90/95 compiler for VAXes, and HP have said there will
    be no F2K3 on Alphas. :-(

    -Ken
    --
    Ken & Ann Fairfield
    What: Ken dot And dot Ann
    Where: Gmail dot Com

  5. Re: "USE" statement in Fortran

    Steven M. Schweda wrote:
    > From: =?ISO-8859-1?Q?Arne_Vajh=F8j?=
    >> /MODULE=dir
    >>
    >> maybe.

    >
    > Or /INCLUDE=(dir[,...]). See HELP FORTRAN /INCLUDE:


    I am conservative and prefer to use /INCLUDE for include files and
    /MODULE for modules.

    Arne

  6. Re: "USE" statement in Fortran

    David_Murphy@murphyfamily.org wrote:
    > On Jan 8, 11:28 pm, s...@antinode.org (Steven M. Schweda) wrote:
    >> (It's amazing how out-of-date my Fortran knowledge is.)

    >
    > Where's Steven Lionel when you need him? ;-)
    >
    > Actually, where *is* Steven Lionel? It's been a long time....


    He is working for Intel.

    I doubt that the VMS compiler is high on Intels priority list.

    He is active in comp.lang.fortran !

    Arne

+ Reply to Thread