Writesignedlonginteger - Crestron SIMPL+ Reference Manual

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

Advertisement

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

WriteSignedLongInteger

Name:
WriteSignedLongInteger
Syntax:
SIGNED_INTEGER WriteSignedLongInteger ( INTEGER
file_handle,
SIGNED_LONG_INTEGER sli )
Description:
Writes data from a file starting at the current file position. Each element of the
structure is written, without any padding bytes, that might actually be there in
memory. 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: FileWrite, WriteInteger, WriteString, WriteStructure,
WriteSignedInteger, WriteLongInteger, WriteLongSignedInteger,
WriteIntegerArray, WriteSignedIntegerArray, WriteLongIntegerArray,
WriteLongSignedIntegerArray, WriteStringArray.
Use ReadSignedLongInteger to read this.
Parameters:
FILE_HANDLE specifies the file handle of the previously opened file (from
FileOpen).
SLI is the signed long integer whose value is written.
Return Value:
Number of bytes written to the file. If the return value is negative, it is an error code.
Example:
(Refer to "File Functions Overview"on page 116)
INTEGER
nFileHandle, iErrorCode;
SIGNED_LONG_INTEGER sli;
StartFileOperations();
nFileHandle = FileOpen ( "MyFile", _O_WRONLY );
IF (nFileHandle >= 0)
{
iErrorCode = WriteSignedLongInteger(nFileHandle, sli);
if (iErrorCode > 0)
PRINT ( "Written to file correctly.\n");
else
PRINT ( "Error code %d\n", iErrorCode);
}
EndFileOperations();
Software
®
SIMPL+
195

Advertisement

Table of Contents
loading

Table of Contents