User Guide

Software Crestron SIMPL+
®
204 z SIMPL+
®
Language Reference Guide - DOC. 5797G
Example:
(Refer to "File Functions Overview"on page 116)
SIGNED_INTEGER nFileHandle, nTotalBytesWritten;
STRUCTURE PhoneBookEntry
{
STRING Name[50];
STRING Address[100];
STRING PhoneNumber[20];
};
PhoneBookEntry OneEntry;
StartFileOperations();
nFileHandle = FileOpen ( “MyFile.txt”, _O_WRONLY );
if (nFileHandle >= 0)
{
WriteStructure( nFileHandle, PhoneBookEntry,
nTotalBytesWritten );
if( nTotalBytesWritten < 0 )
PRINT ( “Error writing structure. Error code = %d\n”,
nTotalBytesWritten );
else
PRINT ( “Structure written to file correctly. Total
bytes written = %d\n”, nTotalBytesWritten );
}
EndFileOperations();
Version:
SIMPL+ Version 3.00.07 or higher (Pro 2 only)
Control System:
2-Series Only