Yo

From Esolang
Jump to navigation Jump to search

Yo

Yo is a cell based language. There is an object called "Yo". You can use it like that:

Die Yo!

(This will terminate the program)

At first, a simple Hello, World Program.

This is Yo!
 Yo uses the STD!
 Hey Yo give me STD!
 Ya. Print me something!
 "Hello World"!
Yeah. This was Yo!

Note: This program is only valid, if you print only one thing.

This is Yo!
 Yo uses the STD!
 At Cell 1 store me "Hello"!
 At Cell 2 store me "World"!
 Hey Yo give me STD!
 Ya. Print me 1 to 2!
Yeah. This was Yo!

Now you can print more!


How to use mathematical functions:

This is Yo!
 Yo can calculate!
 At Cell 1 store me 5!
 Goto Next Cell!
 Kewl. At this point store me 5!
 Hey Yo start the calculator!
 Ya. Add 1 to 2!
Yeah. This was Yo!

Now, how can we print that?

This is Yo!
 Yo can calculate!
 Yo uses the STD!
 Yo needs the casts!
 Wtf? I want cell 1!
 Goto Next Cell!
 Kewl. At this point store me 5!
 Yo move your ass!
 Kewl. At this point store me 5!
 Hey Yo start the calculator!
 Ya. Add 2 to 3!
 Hey Yo needs the casts!
 Ya. Cast me 2 to string!
 Hey Yo give me STD!
 Ya. Print me 1!
This was Yo!

(Yo move your ass! is = Goto Next Cell!)


Loops:

This is Yo!
 Yo uses the STD!
 Yo needs the casts!
 At Cell 1 store me 10!
 Yo move your ass!
 Omg. A loop with 1!
  Hey Yo give me STD!
  Ya. Inc the Cell 1!
  Hey Yo needs the casts!
  Ya. Cast me 0 to string!
  Hey Yo give me STD!
  Ya. Print me 0!
  Hey Yo needs the casts!
  Ya. Cast me 0 to integer!
 Die Loop!
This was Yo!

(This prints the numbers 1 to 10.) (12345678910)

Note: 0 means the curent cell. But 1 means the Cell 1. Not the next cell. If you want relative celladressing, use >1 for the next cell at the right side, or use <1 for the next cell at the left side.