NXC
Version 1.2.1 r5
Main Page
Related Pages
Modules
Data Structures
Files
Examples
All
Data Structures
Files
Functions
Variables
Groups
Pages
ex_findfirstfile.nxc
This is an example of how to use the
FindFirstFile
function.
task main() {
byte handle;
unsigned
int
result, fsize;
string
fname =
"*.ric"
;
result =
FindFirstFile
(fname, handle);
NumOut
(0,
LCD_LINE1
, result,
true
);
int
i=1;
while
(result ==
LDR_SUCCESS
) {
NumOut
(0,
LCD_LINE2
, i,
false
);
TextOut
(0,
LCD_LINE3
, fname,
false
);
Wait
(1500);
// fname = "";
result =
FindNextFile
(fname, handle);
NumOut
(0,
LCD_LINE1
, result,
true
);
i++;
}
CloseFile
(handle);
Wait
(3000);
}
Generated by
1.8.2