home *** CD-ROM | disk | FTP | other *** search
- * TRIPLET.SNO
- *
- * Sample program from Chapter 5 of the Tutorial
- *
- * Trim input, count input lines:
- &TRIM = 1
- N = 0
-
- * Read next input line, all done if End-of-File.
- LOOP S = INPUT :F(END)
-
- * Precede with blanks to center within 80 character line:
- OUTPUT = DUPL(' ', (80 - SIZE(S)) / 2) S
-
- * Increment count, but reset to 0 every third line.
- * Also, output a blank line when count resets:
- N = REMDR(N + 1, 3)
- OUTPUT = EQ(N, 0) :(LOOP)
- END
-