WRITE

Top  Previous  Next

Syntax

INT = WRITE(vFile as FILE | BFILE, var as ANYTYPE)

Description

Writes data to a file.

Parameters

vFile - FILE or BFILE variable successfully opened with OPENFILE

var - For ASCII files can be any built in type. For binary files (BFILE) can be any built in type or UDT.

Return value

Returns number of bytes written to file.

Remarks

In ASCII mode WRITE separates numeric data with a space and strings are terminated with new line characters. In binary mode (BFILE) data is written in raw form.

See Also: READ, OPENFILE, GET, PUT

Example usage

WRITE myfile, iNumber