SimCon logo

SimCon - Fortran Analysis, Engineering & Migration

  FPT Reference ManualDownloadsLicensingHome

 
 
 
 
 
FPT - Fortran File Handling in Windows, Unix, VMS and MPX
 
File Handling

 

The file names in INCLUDE statements may contain VMS logical names, device and directory specifications. They may also contain characters (such as leading dollar signs) which cause problems on Linux and Unix hosts.

 

Specifying a Search Path for INCLUDE files

FPT may be instructed to ignore the directory specifications in INCLUDE statements, and to search for INCLUDE files through a search path. The commands are, for example:

% ignore directories in include statements
% include input path "../include" "/usr/libs/h"

(Note that the leading % sign introduces an FPT command).

When code is migrated, it may be moved to a new directory structure without modifying the INCLUDE statements.

 

Logical Names and File Name Editing

FPT supports VMS-style logical names. The commands are, for example:

% assign aero_include: "/usr/people/collins/aero_include"
% define "/usr/people/collins/stats/anovalib" anovalib:

FPT can also edit INCLUDE file names on-the-fly, before it attempts to open the files. This is particularly useful when the original file names contain characters which cause problems in the current file system. Leading $ characters under Linux and Unix, for example, cause the names to be interpreted as symbols which the operating system attempts to translate. The INCLUDE files must be systematically renamed, but the code need not be changed. The facility can also be used to edit the directory specifications into the appropriate format. For example, the commands:

% assign aero_include: "D:\PROJECTS\AERO_INCLUDE"
% edit input file names: replace "DUA0:" by "D:"
% edit input file names: replace "[JOHN." by "\JOHN\"
% edit input file names: replace "]" by "\"

causes the INCLUDE files specified in the code:

INCLUDE 'AERO_INCLUDE:GEAR.DAT' INCLUDE 'DUA0:[JOHN.INCLUDE]UCPARAMS.DAT'

to be read from the files D:\PROJECTS\AERO_INCLUDE\GEAR.DAT and D:\JOHN\INCLUDE\UCPARAMS.DAT without any code modification. Please see the commands assign and edit input file names in the reference manual for further information.

 

File Names Output by FPT

The output file names are written in the format for the current operating system and the names written in INCLUDE statements match the names of the output files. INCLUDE files may be written to a specified directory, to the currect default directory, or to the original directories. The original output file name extensions may be retained, or may be replaced by new extensions. The directory specifications may be written in the INCLUDE statements or may be omitted. Please see the commands:

% include output directory
% include output file name extension
% keep output directories
% keep file name extensions
% write output directories in include statements

in the FPT Command Reference Manual.

Copyright ©1995 to 2015 Software Validation Ltd. All rights reserved.