Oz

From Esolang
Jump to navigation Jump to search

Oz is a Wizard of Oz-inspired esoteric programming language created by User:Star651 on January 13, 2013. The variable names can be more than one word, and can be abbreviated. For example, the variable over the rainbow can be shortened to over, and Scarecrow can be shortened to Scare. The concept of this language is, you have the variables, which are the main Wizard of Oz characters. Dorothy, Scarecrow, Tinman, Lion, and Wizard. (Note, even though in the movie, the Wizard calls himself Oz, it is Wizard in the programming language for ease of reading and understanding) Most variables can contain numbers, strings and booleans, but the wizard is more of an object than a variable. It contains objects such as heart, brain and courage.

put wizard heart in tinman
put wizard brain in scarecrow

Another variable is over the rainbow. This is used to produce output. So, put dorothy over the rainbow would output the contents of the Dorothy variable. The contents of these variables can be anything. For example, the following code would print out the word pinwheel.

dorothy=pin
scarecrow=wh
tinman=ee
lion=l
put dorothy over the rainbow
put scarecrow over the rainbow
put tinman over the rainbow
put lion over the rainbow

Of course, you don't have to do all that work to write pinwheel; this is just a multi-variable example. You could give Dorothy the whole word, and she could go over the rainbow with it, like this:

dorothy=pinwheel
put dorothy over the rainbow 

Or, you could give scarecrow a pin brain, and tin man a wheel heart (both from the wizard), and no one would know the difference.

wizard brain=pin
wizard heart=wheel
put wizard brain in scarecrow
put wizard heart in tinman
put scarecrow over the rainbow
put tinman over the rainbow 

It doesn't matter; as long as Dorothy gets home. That's why all programs must end with put dorothy home. Putting any character variable "home" deletes it from memory. Who cares anyway? This is just a Wizard of Oz fanfic for the programmers out there!