Reputation: 11
please give me some hint how to perform File handling in CAPL programming. How to open and how to access the file , what and which types of functions are available for file handling.
give some suggestion regarding this topics. Thank you.
Upvotes: 0
Views: 7900
Reputation: 3500
CAPL syntax provides you with some functions. To open a file stream for reading, use openFileRead();
.
You may use function fileGetString()
to read lines from such file. A code snippet might look like
char input[30] = "test.txt"
int bufferLength = 256;
char buffer[bufferLength];
dword fh;
fh = openFileRead(input,0);
while(fileGetString(buffer,bufferLength,fh)!=0) {
// do whatever
}
Please put some more effort next time: this is not how StackOverflow works.
Upvotes: 1