Spin

From Esolang
Jump to navigation Jump to search

Spin is an esoteric programming language made by User:Hohoo. Its syntax resembles BASIC.

Commands

Command Description
START TO SPIN Starts the program. Before it all code is ignored.
STOP SPINNING Stops the program. After that all code is ignored.
MORE SPINNING PLEASE Starts a loop.
LESS SPINNING PLEASE Ends a loop.
WHAT IF SPINNER If
HEY SPINNER DO THAT Then
WHAT IF SPINNER SCREWS UP Else
WHAT IF SPINNER DOES THAT Else-If
NEW SPINNER Declare a variable
SPIN THE SPINNER Give a variable a value.
SPIN THIS ALL Print text/variable.
FEED THE SPINNER Store input to a variable.

Syntax

The syntax is as follows:

COMMAND! Something.

Only the first letter of a word is significant. Thus

START TO SPIN!
SPIN THIS ALL! Something to spin.
STOP SPINNING!

would result:

Sts

. means space (or newline if it's the last letter). So

START TO SPIN!
SPIN THIS ALL! a super dangerous fire. another singing doodle ferry.
SPIN THIS ALL! Quickly uickly ickly ckly kly ly y
SPIN THIS ALL! . eat at tea. It turns.
STOP SPINNING!

would result:

asdf asdf
Quickly eat it

A word about variables.

You can assign a value to a variable in this way:

SPIN THE SPINNER! Variable. Value.

Variable must have an exclamation mark after the variable name when using SPIN THIS ALL command. So

START TO SPIN!
NEW SPINNER! Hey ey yes.
SPIN THE SPINNER! Hot elefant yuck. OH NO EH.
SPIN THIS ALL! Hello ew ytterbium!
SPIN THIS ALL! High end yielding.
STOP SPINNING!

results:

1
Hey

Values from keyboard input (FEED THE SPINNER command) don't need the value specified. If you specify it, it will indeed be ignored.

When assigning an integer/float value to variable, the text must be capitals (and must be an English numeral). Example:

START TO SPIN!
NEW SPINNER! Look ook ok k.
SPIN THE SPINNER! Look ook ok k. Hey ey ey..
SPIN THIS ALL! Look ook ok k!
SPIN THE SPINNER! Look ook ok k. TEA WAITS ONE.
SPIN THIS ALL! Look ook ok k!
SPIN THE SPINNER! Look ook ok k. TWO WISE OAKS. TINY HARMFUL READABLE EMPLOYEE ERASER.
STOP SPINNING!

resulting

Hey.
2
2.3

Examples

Hello World

START TO SPIN!
SPIN THIS ALL! High end lock likes offering. With old red lamps dodged.
STOP SPINNING!