Rice Lake iRite IDE User Manual

Page 88

Advertising
background image

84

920i

Programming Reference

SetFileTermin( termin : LineTermination )

This determines what is appended at the end of each line.

Termin

- See Section 4.0 for LineTermination type options.

Example:

SetFileTermin(FileCRLF);

DBLoad(database name)

Opens a file in Read mode using the name of the database and the Unit ID and calls the core to process it as a
database file. The file is closed when done.

SysCode values returned:

SysOk
SysNoSuchDatabase
SysNoFileSystemFound
SysFileAlreadyOpen

SysFileNotFound
SysDirectoryNotFound
SysInvalidFileFormat
SysPortBusy

Example:

if DBLoad("Product") = Sysok then

DisplayStatus("Product Database Loaded into 920i")

end if;

DBSave(database name)

Opens a file in Create mode using the name of the database and the Unit ID and calls the core to process it as a
database file. File is closed when done. For example if the Unit ID in the 920i was 5, it would store a file to E:/
5/Product.txt. (If your computer recognized the thumb drive as drive E).

SysCode values returned:

SysOk
SysNoSuchDatabase
SysNoFileSystemFound
SysFileAlreadyOpen

SysFileNotFound
SysDirectoryNotFound
SysFileExists
SysPortBusy

Example:

if DBSave("Product") = Sysok then

DisplayStatus("Product Database Saved to thumb drive")

end if;

SysCodeToString( code : SysCode )

Returns the name of the SysCode as a string (so it can be printed or displayed).

Example:

Result := SetFileTermin(FileCRLF);

if Result <> SysOk then

WriteLn(3,(SysCodeToString(Result)));

--Makes the syscode able to be printed

else

WriteLn(3,"SysOK");

end if;

Advertising
This manual is related to the following products: