0

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.

Akash shah
  • 1
  • 2
  • 9

1 Answers1

1

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.

Daemon Painter
  • 3,208
  • 3
  • 29
  • 44