Go to: Return value. Related commands. Examples.
// Make a sample file to use as a test example // $exampleFileName = ( `internalVar -userTmpDir` + "example.tmp" ); $fileId=`fopen $exampleFileName "w"`; fprint $fileId "Hello there\nMEL user\n"; fclose $fileId; // Now read it back one line at a time // $fileId=`fopen $exampleFileName "r"`; string $nextLine = `fgetline $fileId`; while ( size( $nextLine ) > 0 ) { print ( $nextLine ); $nextLine = `fgetline $fileId`; } fclose $fileId;