Skip to content
Shimakaze-Kan edited this page Feb 13, 2021 · 1 revision

Syntax errors

If the instruction is not recognized, a syntax error occurs.

Example:

How about a hotcake?
Show me a pancake!d
Eat all of the pancakes!
Instruction on line 2 cannot be found

This happened because in the second line instead of "Show me a pancake!" it is "Show me a pancake!d"

Runtime errors

Empty Stack

Appears if the stack is empty and some instruction is trying to get or check some element of the stack.

Example:

Eat the pancake on top!
Eat all of the pancakes!
Runtime error: stack is empty, line 1

Label doesn't exist

If a conditional statement tries to jump to a label that does not exist, a runtime error occurs.

Example:

Put this X pancake on top!
If the pancake isn't tasty, go over to "label".
Eat all of the pancakes!
Runtime error: label 'label' doesn't exist, line 2

Conversion error

Occurs when an instruction "Give me a pancake!" receives input that is not a number.

In this example, the word "test" is passed instead of a number.

Example:

Give me a pancake!
Show me a numeric pancake!
Eat all of the pancakes!
>test
Runtime error: value 'test' isn't Int32, line 1

No "Eat all of the pancakes!" at the end of the code

Every code must end with the instruction "Eat all of the pancakes!", if there is no such instruction an error will occur.

Example:

Put this X pancake on top!
Put this X pancake on top!
Put this X pancake on top!
The code must end with an "Eat all of the pancakes!" instruction