Simple Programming Language written in Obj-C for my Programming Languages class
- Declares a new function
- Takes unlimited arguments: functionName arguments
- Example usage: "func functionName add 2 1"
- Prints a new line
- Takes no arguments
- Example usage: "newline"
- Takes in user input
- Takes 1 argument: prompt
- Example Usage: input please enter your name:
- Saves input in variable "In"
- Prints the value of a given variable
- Takes 1 argument: variable name
- Example Usage: whatis X
- Repeats the next command the given number of times (> 0)
- Takes 1 argument: int
- Example usage: loop 5
- Variables defined by strings starting with capital letters
- Sets the value of a new variable
- Takes 2 arguments: variable name, value
- Example usage: var X 2
- Pauses the program for a given amount of seconds
- Takes 1 argument: int
- Example usage: pause 3
- Adds all given numbers and returns a value
- Takes unlimited arguments
- Example usage: add 1 2 3 4
- Stores result in "Sum" variable
- Subtracts all given numbers and returns a value
- Takes unlimited arguments
- Example usage: subtract 4 3 2 1
- Stores result in "Difference" variable
- Prints a help page
- Takes no arguments
- Example usage: help
- Prints a line of text
- Takes unlimited arguments
- Example usage: print hello world
- Reads a file from the system
- Takes 1 arguments
- Example usage: file /path/to/file.simpl
- Exits the program
- Takes no arguments
- Example usage: exit