READ Function (File)

Use this function to read from an ASCII or binary file.


[Read :=] File.READ(Variable)

Parameters

File

Type: file

Use this variable to refer to the file.

Variable

Type: any

The destination variable. Must be the maximum length for the variable type.

NoteNote

In previous versions of Microsoft Dynamics NAV, the Variable parameter did not have to be the maximum length. The READ function could read partial data. In Microsoft Dynamics NAV 2009, it is not supported to read fewer than the maximum bytes.

Type: integer

This optional return value shows the number of bytes read.

If TEXTMODE Function (File) is set to true, a line of text from the file is read, evaluated, and the variable is set equal to the result.

If TEXTMODE is set to false, the number of bytes to read is determined by the size of the variable.

Community Additions

ADD
Show: