|
Tutorial
A tutorial on the Cat language
IntroductionCat is a functional stack-based programming language. All operations in Cat manipulate a single shared stack. If you type a number in Cat it is pushed onto the stack as so: >> 2 stack: 2 >> 3 stack: 2 3 >> 4 stack: 2 3 4 If you write an operator it will apply to the top two items >> add stack: 2 7 If you want to remove an item from the stack you can call pop: >> pop stack: 2 You can also enter multiple numbers or instructions on the same line: >> 4 4 add stack: 2 8 You can remove all items from a stack by calling clr: >> clr stack: _empty_ The three basics instructions for manipulating the stack are:
More Resources
|
Sign in to add a comment