24.11.2014 Views

Open Watcom FORTRAN 77 Language Reference

Open Watcom FORTRAN 77 Language Reference

Open Watcom FORTRAN 77 Language Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>FORTRAN</strong> Statements<br />

2.55 INQUIRE Statement<br />

The INQUIRE statement is used to ask about certain properties of a named file or its connection to a<br />

particular unit. There are two forms of the INQUIRE statement; inquire by file name and inquire by unit.<br />

2.55.1 INQUIRE by FILE<br />

<br />

INQUIRE (iflist)<br />

where:<br />

iflist<br />

includes the FILE= specifier and may include at most one of each of the inquiry specifiers<br />

listed below. Specifiers are separated by commas. The FILE= specifier has the form<br />

FILE = fin<br />

where fin is a character expression whose value when trailing blanks are removed is the<br />

name of a file being inquired about. The file need not exist or be connected to a unit.<br />

Example:<br />

LOGICAL EX, OD<br />

INTEGER NUM<br />

INQUIRE( FILE=’ROLL’,EXIST=EX,OPENED=OD,NUMBER=NUM )<br />

In the above example, information is requested on the file PAYROLL. In particular, we want to know if it<br />

exists, whether it is connected to a unit, and what the unit number is (if it is indeed connected).<br />

2.55.2 INQUIRE by UNIT<br />

<br />

INQUIRE (iulist)<br />

where:<br />

iulist<br />

includes the UNIT= specifier and may include at most one of each of the inquiry specifiers<br />

listed below. Specifiers are separated by commas. The UNIT= specified has the form<br />

[UNIT =] u<br />

where u is an external unit identifier. An external unit identifier is a non-negative integer<br />

expression. If the optional UNIT= specifier is omitted then the specifier must be the first<br />

item in the list of specifiers.<br />

INQUIRE Statement 93

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!