fileReadLine

C Scripting Language
Reference Manual
Version 4.4.0

<< Back  End  Next >>
 
 
INDEX
Introduction
Installation
Using the CSL executive
Language
Directives
System library
String library
Math library
Regular expression lib.
File library
   fileClose
   fileCopy
   fileDelete
   fileDelDir
   fileEof
   fileFlush
   fileInfo
   fileLocate
   fileMakeDir
   fileOpen
   fileRead
   fileReadLine
   fileReadPos
   fileRename
   fileTempName
   fileWrite
   fileWriteLine
   fileWritePos
Database library
Async Communication
Registry/Profile handling
Windows control
C API
C++ Class Interface
CSL links
  
fileReadLine(
  const handle)   // file handle

Reads a line from file. For best results the file should not be opened in binary mode (otherwise there may be cr's at the end of the returned text).

Check for eof before reading.

Returns the line (the terminating LF character is removed).

Example:

// show contents of file test.txt
var fh = fileOpen('test.txt', fileOpenRead);
while (!fileEof(fh)) sysLog(fileReadLine(fh));
fileClose(fh);
  Copyright © IBK Landquart Last revision: 27.05.2002 << Back  Top  Next >>