Crestron SIMPL+ Reference Manual page 209

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

Advertisement

Crestron SIMPL+
Language Reference Guide - DOC. 5797G
®
WriteString
Name:
WriteString
Syntax:
SIGNED_INTEGER WriteString ( INTEGER file_handle, STRING
s )
Description:
Writes a string to 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 the 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
function and when to use the related functions: FileWrite, WriteInteger, WriteString,
WriteStructure, WriteSignedInteger, WriteLongInteger, WriteLongSignedInteger,
WriteIntegerArray, WriteSignedIntegerArray, WriteLongIntegerArray,
WriteLongSignedIntegerArray, WriteStringArray.
NOTE: Input and Output variables of any kind are not allowed in the file reading and
writing functions, just internal variables.
Use ReadString to read this.
Parameters:
FILE_HANDLE specifies the file handle of the previously opened file (from
FileOpen).
S is the string whose value is written.
Return Value:
Number of bytes written to the file. If the return value is negative, it is an error code.
Software
118
for a discussion of when to use this
SIMPL+
®
199

Advertisement

Table of Contents
loading

Table of Contents