Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Hull and Outfitting

File Handling

  • Last UpdatedJan 05, 2024
  • 1 minute read

The Marine DARs routines use CreateFile to allocate file units dynamically. The number of file units required by Marine DARs depends on the number of databases in the MDBs used by the DARs application program.

A DARs application program can use two techniques, fixed and variable, to allocate FORTRAN file units for its own use.

Using the fixed method, DARs programmers may use any logical unit (positive integers) valid in FORTRAN.

Using the variable method, programmers request free units, as required, by calls to D3UGTU. The variable method also provides a routine D3UCLU which returns units when no longer required. D3UGTU simply allocates a FORTRAN unit in the valid range. The working of this interface depends upon the programmer following the call to D3UGTU immediately with a file opening statement.

Fixed or variable methods may be used together.

If the DARs application program allocates so many units that the DARs package runs out of file units for its own purposes, the DARs routine affected will return an appropriate error condition.

If D3UGTU is used, files may be accessed by FORTRAN 77 input/output statements such as OPEN, READ, CLOSE, using fixed or allocated FORTRAN units.

LOGICAL D3UGTU, D3UCLU, OK

INTEGER FUNIT

IF (.NOT. D3UGTU( FUNIT )) GOTO 999

OPEN( FUNIT, .... )

READ( FUNIT, .... )

CLOSE( FUNIT )

OK = D3UCLU( FUNIT )

or

EXTERNAL EX1

CALL D3IBEG(EX1,' ')

..

SUBROUTINE EX1

..

OPEN(5, .... )

TitleResults for “How to create a CRG?”Also Available in