- This article is a stub, which means that it is not detailed enough and needs to be expanded. Please help us by .
As the name of the language suggests, every instruction prints something, asks for input, and then checks the input in a SWITCH clause. Syntax goes a little like this:
PRINT "STUFF TO PRINT HERE." ASK SWITCH INPUT CASE "DERP" GOTO 2 CASE "HERP" GOTO 3 ELSE GOTO 1
And that's it. Programs are lines after lines of this same instruction with different parameters. Strings can only have capital letters to add to the feel of the language. Additionally, if the program tries to go to an invalid line number, it halts.
Like in Goto, lines of code in PRINTASKSWITCHINPUTCASEXGOTOACASEYGOTOBELSEGOTOC are like the states of a finite state machine.
PRINT "HELLO WORLD!" ASK SWITCH INPUT ELSE GOTO 0
Very bad RPG
PRINT "YOU'RE IN A DARK ROOM MADE OF STONE. THERE'S A DOOR TO THE NORTH AND ONE TO THE SOUTH." ASK SWITCH INPUT CASE "GO NORTH" GOTO 2 CASE "GO SOUTH" GOTO 3 ELSE GOTO 1 PRINT "EVERYTHING FADES TO WHITE. I WONDER WHAT HAPPENED." ASK SWITCH INPUT ELSE GOTO 0 PRINT "YOU'RE IN A DARK ROOM MADE OF DIRT. THERE'S A DOOR TO THE SOUTH BUT NOT TO THE NORTH... HANG ON A MINUTE..." ASK SWITCH INPUT CASE "GO SOUTH" GOTO 4 CASE "GO NORTH" GOTO 2 ELSE GOTO 3 PRINT "YOU'RE IN A BRIGHT ROOM MADE OF GOLD! THERE'S A DOOR TO THE SOUTH AND A DOOR TO THE NORTH." ASK SWITCH INPUT CASE "GO SOUTH" GOTO 0 CASE "GO NORTH" GOTO 3 ELSE GOTO 4 PRINT "YOU'RE OUTSIDE! YOU WIN YAY! WHO CARES ANYWAY? YOU WERE IN A ROOM OF GOLD AND LOOK, THE DOOR'S GONE. YOU CANT GET TO THE GOLD. GREAT, NOW WHAT DO WE DO? I GUESS WE CANT DO ANYTHING... LET'S JUST GET HOME." ASK SWITCH INPUT ELSE GOTO 0