2 ms·
https://raganwald.com/assets/snobol-green-book.pdf https://raganwald.com/assets/snobol-green-book.pdf "4.6.4 Example - Tower of Hanoi" on pages 109-111 (the sc
by tpmx 3y ago
https://raganwald.com/assets/snobol-green-book.pdf https://raganwald.com/assets/snobol-green-book.pdf
"4.6.4 Example - Tower of Hanoi" on pages 109-111 (the scanned page numbers)
- pavlov 3y agoIs it even a 1980s programming language without a Hanoi example? Here's the program in its all-caps, weirdly indented beauty: DEFINE('HANOI(N,NS,ND,NI)') :(HANOI.END) HANOI EQ(N,O) :S(RETURN) HANOI(N - 1,NS,NI,ND) OUTPUT 'MOVE DISC ' N ' FROM ' NS ' TO ' ND HANOI(N - 1,NI,ND,NS) :(RETURN) HANOI.END TEST HANOI (5,'A','C','B') END
- greenyoda 3y agoActually, SNOBOL is a 1960s programming language[1], so it wouldn't have been a trendy new language in an 80s version of HN. In the 1960s, most programming was done on punched cards, and keypunch machines (and many computers) didn't have lower case letters on them. Hence, languages from that era, like FORTRAN, COBOL, PL/I, LISP and assembly language, were written in all-caps. [1] https://en.wikipedia.org/wiki/SNOBOL https://en.wikipedia.org/wiki/SNOBOL