DGL Statement Reference : READ

READ

Description
Reads a line of information from an external file into variables in the template. The numeric elements in the input line are separated by blanks or tabs. Reading to a string variable reads the rest of the line.
The READ statement can operate as a function that returns either stm_success, stm_cannot_read_file, or stm_end_of_file.
Syntax
READ (fl, variable1, variable2, ...);
Parameters
 
variable1, variable2...

 

Example
In this example, i is an integer and str is a string. This statement, when applied to an input line 12 May 2003, results in i=12, str=’May 2003’.

read(fd, i, str)

See Also