next up previous contents
Next: Multiple types and Up: Internal data storage Previous: Opening the temporary

Using the temporary file

The file will be used by the low-level ADF calls such as ADF_[C]NEW[n][v], ADF_[C]GET[n] and ADF_[C]PUT[n]. The first use is likely to be for opening a file, where the subtoutine ADF_FOPEN contains the line,

CALL ADF_NEW0( 'FILE', ID, STATUS )
Here a temporary structure FILE is to be created to store information on the opened file. The subroutine performs the following steps,

Data can be added to this FILE structure using code such as,

CALL ADF_CPUT0C( ID, 'REP', REP, STATUS )
CALL ADF_CPUT0C( ID, 'LOCATOR', FILE_LOC, STATUS )

After all information on the opened file has been stored the temporary file will look something like,

HTRACE Version 2.2-0
 ADF_OBJ          <ADF_OBJ>      {structure}
   ADF_LOC          <ADF_LOC>      {structure}
     2                <_CHAR*15>     " 5 h           "

   2                <FILE>         {structure}
     REP              <_CHAR*3>      "HDS"
     LOCATOR          <_CHAR*15>     " 5 0           "
     MODE             <_CHAR*4>      "READ"
     CLASS            <_CHAR*11>     "BinDS|Array"
     TRACE            <TRACE>        {structure}
       NLEV             <_INTEGER>     1
       PATH             <_CHAR*3>      "IMG"
       FILE             <_CHAR*35>     "/lsoft1/asterix/work/rb/adf/img.sdf"
 
     SHAPE[2]         <_INTEGER>     100,100

The development subroutine ADF_PRINT can be used display the contents of a pointer in a similar manner to the call ADI_PRINT.



Asterix
Tue Jun 23 11:39:42 BST 1998