FILEZORZ

HAI
CAN HAS STDIO?
PLZ OPEN FILE "LOLCATS.TXT"?
	AWSUM THX
		VISIBLE FILE
	O NOES
		INVISIBLE "ERROR!"
KTHXBYE

Some notes:

  • PLZ … ? introduces a try/exception block.
    • AWSUM THX introduces the block to execute on success with PLZ. It is implicitly closed by…
    • O NOES, which is the exception block. It should be closed with KTHX, but it hits the final KTHXBYE, which (I assert) is a bit of syntactic sugar that closes everything.
  • OPEN handles non-default-terminal-based I/O. FILE in this case is simply a variable, a file handle for the LOLCATS.TXT file.
  • INVISIBLE is a print command to the debug console, commonly known as STDERR.
examples/filezorz.txt · Last modified: 2007/05/31 09:35 by atl
Recent changes RSS feed Creative Commons License Donate Driven by DokuWiki