Fileread - Crestron SIMPL+ Reference Manual

Language reference guide
Hide thumbs Also See for SIMPL+:
Table of Contents

Advertisement

Crestron SIMPL+
Language Reference Guide - DOC. 5797G
®

FileRead

Name:
FileRead
Syntax:
SIGNED_INTEGER FileRead (INTEGER handle, STRING buffer,
INTEGER count )
Description:
Reads data from a file as a series of bytes into a buffer, starting at the current file
position. Refer to the section entitled "Reading and Writing Data to a File" on page
118
for a discussion of when to use this function and when to use the related functions
FileRead, ReadInteger, ReadString, ReadStructure, ReadSignedInteger,
ReadLongInteger, ReadLongSignedInteger, ReadIntegerArray,
ReadSignedIntegerArray, ReadLongIntegerArray, ReadLongSignedIntegerArray,
ReadStringArray
To avoid an error being generated to the console, use FileEOF() to test for the end of
the file prior to reading.
NOTE: Input and Output variables of any kind are not allowed in the file read
functions.
Parameters:
HANDLE specifies the file handle of the previously opened file (from FileOpen).
BUFFER is the destination variable for bytes that are read.
COUNT specifies the number of bytes to read.
Return Value:
Number of bytes read from file. If the return value is negative, it is an error code.
Refer to "File Function Error Codes" on
page
117.
Software
®
SIMPL+
141

Advertisement

Table of Contents
loading

Table of Contents