Project

General

Profile

Added in 1.9.0

$lines(filename)

Returns the total number of lines in the specified text file.

Parameters

filename - Filename to read from.

Example

;Open a file for writing
/fopen file file.txt

;Write a line to the file
/fwrite file Hello World

;Close the file
/fclose file

;Print the number of lines in file.txt
//echo -ag $lines(file.txt)
<pre>

Updated by Per Amundsen over 3 years ago · 1 revisions

Also available in: PDF HTML TXT