Category : Miscellaneous Language Source Code
Archive   : SNOBOL4A.ZIP
Filename : TRIPLET.SNO

 
Output of file : TRIPLET.SNO contained in archive : SNOBOL4A.ZIP
* 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


  3 Responses to “Category : Miscellaneous Language Source Code
Archive   : SNOBOL4A.ZIP
Filename : TRIPLET.SNO

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/