Pep and Nom

home | documentation | examples | translators | download | blog | all blog posts

the ℙ𝕖𝕡 "lines" register

The pep virtual machine maintains an automatic count of the number of lines which have been read from the input stream. This line-count is kept in the lines register of the virtual machine. You can access this register with the lines command and the nolines command.

The lines command adds the current count in the lines register to the end of the workspace buffer (as text). The nolines command resets the lines counter to zero (the lines counter is automatically initialised at zero at the start of the nom script).

count the number of lines after the word "mark"


 

notes

The pep interpreter actually accepts “ll” as an alias for the lines command, but “lines” seems a lot more readable.