home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Black Box 4
/
BlackBox.cdr
/
progpas
/
visible.arj
/
LISTER
< prev
next >
Wrap
Text File
|
1985-08-08
|
768b
|
24 lines
PROGRAM LISTER; {a simple program to add line numbers to a listing}
{since it uses INPUT and OUTPUT for the files, you should run it like:
{ LISTER <INFILE >OUTFILE
{ or
{ LISTER <INFILE >PRN
{ to write to the printer.
{you could try:
{ LISTER <LISTER to see this pgm. with line numbers.}
VAR
STR : STRING; {for the line coming in; 80 char max!}
LINENUM : INTEGER;
BEGIN
LINENUM := 0;
WHILE NOT EOF DO
BEGIN
LINENUM := LINENUM + 1;
READLN(STR);
WRITELN(LINENUM:4, ':', STR);
END;
END.