Use of Data Access Routines
- Last UpdatedJan 05, 2024
- 1 minute read
The use of Data Access Routines is best illustrated by reference to some simple examples. The examples used in this section are based on the Marine project used in the acceptance test. Details in this section are applicable to any machine type.
Where the examples use a PRINT (or list-directed WRITE) statement, programmers should note that the default format obtained is dependent on the compiler. Further, some compilers skip column 1 whether outputting to terminal or file. This is not the case when a FORMAT specifier is used with a WRITE statement, where the programmer can control the placement of characters, including the use of column 1. In this situation, the output should not be dependent on the compiler. The output for these examples is therefore system-dependent in some minor respects (for example, spacing of numbers and number of decimal places). The output shown in this section is typical.
Example 1 is a simple example, involving navigation to the last flange in the first branch of a named pipe.
Example 2 is a longer example, involving calls to several of the auxiliary routines.
FORTRAN source files for the two examples are included with a release of Data Access Routines.