Function EN Version 1.91

@ReadVarOSFile

Import OSFile

Syntax

@ReadVarOSFile(FILEHANDLE1);

Description

Reads a variable from the OSFILE identified by FILEHANDLE FILEHANDLE1. The variable must have been written using @WriteVarOSFile, and is returned as the @Function result.
The contents of a variable, including its name and related information, can be written directly to a file and read back again.

Return:
On success, the variable read from the file.
On error, @Error;

Beispiel: @ReadOSFile(FILEHANDLE1;RETTYPE2;LENGTH3)

FILEHANDLE1:=@OpenOSFile("C:\\TEST.BIN";"RB");
@LogReport(@ReadVarOSFile(FILEHANDLE1));
FILEHANDLE1:=@CloseOSFile(FILEHANDLE1);

A file named "C:\\TEST.BIN" is opened for reading, and the variable previously written to this file is read. Its contents are then output to the APILOG.

Note : This text was machine-translated and may contain inaccuracies.