Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Tom Rettigs Library - lines(<expc>, <n line length>) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 LINES(<expC>, <N line length>)
 Evaluates the number of lines in output at a specified line length.
 Returns <expN> number of lines to display <expC> within <line length>.

 Returns zero if <expC> is null, or if <line length> is <= zero
 or too small to handle an unbroken word in <expC>.

 * Branching decision to different routines
 memvar = FILEREAD( "Textfile.txt" )
 m_lines = LINES( memvar, 65 )
 IF m_lines < 60
    <output routine for one page>
 ELSE
    <output routine with page breaks>
 ENDIF

 * Evaluate number of pages in output
 page_len = 60   && lines per page
 no_pages = CEILING(LINES(memvar,65) / page_len)


             Placed in the Public Domain by Tom Rettig Assoc.

See Also: FILEREAD() TABSTRIP() WPSTRIP() WRAP()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson