-
Notifications
You must be signed in to change notification settings - Fork 0
Errors
Shimakaze-Kan edited this page Feb 13, 2021
·
1 revision
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"
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
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
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
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