"USE" statement in Fortran - VMS

This is a discussion on "USE" statement in Fortran - VMS ; 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 ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: "USE" statement in Fortran

  1. "USE" statement in Fortran

    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

    Ransom Fitch

  2. Re: "USE" statement in Fortran

    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.

    Arne

  3. Re: "USE" statement in Fortran

    In article
    ,
    RLFitch writes:

    > 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


    I have a symbol about 200 characters long for my standard compile
    command. It has /INCLUDE=(A,B,C) where A, B and C are directories. So,
    I can automatically look for stuff in several directories (on several
    disks).


+ Reply to Thread