NXC  Version 1.2.1 r5
 All Data Structures Files Functions Variables Groups Pages
ex_sysfileread.nxc

This is an example of how to use the SysFileRead function along with the FileReadWriteType structure.

task main()
{
frArgs.FileHandle = foArgs.FileHandle;
frArgs.Length = 12; // number of bytes to read
SysFileRead(frArgs);
if (frArgs.Result == NO_ERR) {
TextOut(0, LCD_LINE1, frArgs.Buffer);
// show how many bytes were actually read
NumOut(0, LCD_LINE2, frArgs.Length);
}
}