Crestron simpl plus language ref 사용자 설명서
Crestron SIMPL+
®
Software
Language Reference Guide - DOC. 5797G
SIMPL+
®
z 175
ReadString
Name:
ReadString
Syntax:
SIGNED_INTEGER ReadString ( INTEGER file_handle, STRING
s )
Description:
Reads a string from a file starting at the current file position. Internally, the string is
stored as a 2-byte length, most significant byte first, then the actual string bytes. In
the case of a string variable, the total number of bytes written is calculated from the
size of the string, not the string allocation size. Refer to the section entitled “Reading
and Writing Data to a File” on page
stored as a 2-byte length, most significant byte first, then the actual string bytes. In
the case of a string variable, the total number of bytes written is calculated from the
size of the string, not the string allocation size. Refer to the section entitled “Reading
and Writing Data to a File” on page
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.
ReadStructure, ReadSignedInteger, ReadLongInteger, ReadLongSignedInteger,
ReadIntegerArray, ReadSignedIntegerArray, ReadLongIntegerArray,
ReadLongSignedIntegerArray, ReadStringArray.
Parameters:
FILE_HANDLE specifies the file handle of the previously opened file (from
FileOpen).
FileOpen).
S is the string whose value is read.
Return Value:
Number of bytes read from file into the string. If the return value is negative, it is an
error code. An error occurs if the string is not large enough to hold the data.
error code. An error occurs if the string is not large enough to hold the data.
NOTE: Input and Output variables of any kind are not allowed in the file reading and
writing functions, just internal variables.
writing functions, just internal variables.