BB___LINES

=LINES= toc

Description
> Returns the number of lines in the text window or texteditor. (A line ends with a carriage return, CR).

Hints
Place useful hints about this keyword here

Example
code format="lb" nomainwin

WindowWidth=300 WindowHeight=300

statictext #h.st1 "Enter text data", 10, 15, 200, 20 texteditor #h.text 10, 35, 260, 150 button #h.btn "Count lines", [mainExit], UL, 10, 200 statictext #h.st2 "", 100, 200, 100, 25

open "" for window as #h #h "trapclose [quit]" '   'print some sample text to the texteditor window '   #h.text "This is the original contents of the data file. ";chr$(13);_ "Close window without changing text.";chr$(13);_ "Then change text and close window to see ";chr$(13);_ "the difference." wait

[mainExit] #h.text "!lines cnt" #h.st2 "";cnt-1; " lines in the text." wait

[quit]                             'close main window close #h end code

Useful Functions
code format="lb" Place a useful function using this keyword here code