04 What is the syntax of an Ook! programme?

Ook! has only three syntax elements:

  • Ook.
  • Ook?
  • Ook!

These are grouped into tuples of two. The Ook tuples can be used like Brainfuck symbols, which also knows only eight command names. Each Ook! programme therefore consists of an even number of ooks. Line breaks are ignored.

If the words Ook are omitted, Ook! programmes can also be abbreviated.

Ook!-command set

Ook!Ook!BrainfuckDescription
Ook. Ook.. .+increase the value of the current cell by 1
ook! OOk!! !Decrease the value of the current cell by 1
Ook. Ook?. ?>move one cell to the right
Ook? Ook.? .<move one cell to the left
Ook! Ook?! ?[Loop start – run through the loop as long as the value of the current cell is not 0
Ook? Ook!? !]Loop end – ends the loop when the value of the current cell is equal to 0
Ook! Ook.! ..Print the value of the current cell
Ook. Ook!. !,read a value from the keyboard into the current cell