[Info-vax] Command Procedure - FORTRAN

abrsvc dansabrservices at yahoo.com
Wed Aug 12 13:06:45 EDT 2020


On Wednesday, 12 August 2020 12:50:02 UTC-4, HCorte  wrote:
> Trying to create the following command procedure that accepts two variables from the command line and compile .f and then link .obj for a fortran program.
> 
> But when reachs the line:
>    FORTRAN FILENAME+".F"
> instead of replacing the variable for the inputed value that the user inserted it tries to run FORTRAN FILENAME.F instead, is there a way to make it replace the variable for its values before it runs the command: FORTRAN ??? 
> 
> $ !compile and link script example to later on
> $ !change make a double of dfor and dlink with flag for debug mode
> $ INQUIRE DEBUG-
>   "enter command to compile and link with debug mode on or off (yes or `
> $ INQUIRE FILENAME-
>   "enter the file name to compile and link?"
> $ IF DEBUG .EQS. "YES"
> $    THEN
> $        WRITE SYS$OUTPUT "DEBUG MODE ON"
> $        WRITE SYS$OUTPUT FILENAME+".TXT"
> $        EXIT
> $    ELSE
> $        IF DEBUG .EQS. "NO" THEN
> $           WRITE SYS$OUTPUT "DEBUG MODE OFF:"+FILENAME
> $           FORTRAN FILENAME+".F"
> $           LINK/EXE=FILENAME+".EXE" FILENAME+".OBJ"
> $           EXIT
> $        ENDIF
> $ ENDIF
> $ WRITE SYS$OUTPUT "Invalid option only yes or no repeat the process"-
> $ +" again"

The compilation line thinks that you are trying to compile two different files.  TTo accomplish what you wish try this:

FORTRAN "''filename'.f"
LINK/EXE="''filename'.exe" "''filename'.obj'"

The above will provide the correct symbol substitution and include the extensions that you want.



More information about the Info-vax mailing list