Read a file line by line: Difference between revisions

Content added Content deleted
m (Put C code inside a lang tag)
m (→‎belt and suspenders: moved a comment.)
Line 2,714: Line 2,714:
say y /*show the content of the line (record)*/
say y /*show the content of the line (record)*/
end /*#*/
end /*#*/
say /*stick a fork in it, we're all done. */
say
say 'file ' fID " has " #-1 ' records.' /*display the record count summary. */
say 'file ' fID " has " #-1 ' records.' /*display the record count summary. */
call lineout fID /*close the input file (most REXXes). */
call lineout fID /*close the input file (most REXXes). */</lang><br><br>

/*stick a fork in it, we're all done. */</lang><br><br>
===ARexx version===
===ARexx version===
<lang rexx>/* Also works with Regina if you state OPTIONS AREXX_BIFS ; OPTIONS AREXX_SEMANTICS */
<lang rexx>/* Also works with Regina if you state OPTIONS AREXX_BIFS ; OPTIONS AREXX_SEMANTICS */