SIMPLE is a basic programming langauge designed for golfing purposes.
git clone https://github.com/Muhammad-Salman-Sheikh/Language/ cd Language node code.js
The syntax of the language is as follows:
Compute expressions like usual, i.e
2 + 1,
5 % 2etc..
Supports addition, subtraction, multiplication, division, modulo (
Supports variables, to declare one simply type the variable's name, an equals sign and the number you want to assign it to.
( x = 12 )will declare a variable
xwith a value of
Functions are declared with
Func nameOfFunc arg1 arg2 => ( return what ever ), e.g
Func double x => x * 2will make a function
doublethat has an argument
xand returns the results of the expression
x * 2. Entering the expression
double 3will expand to
- An empty program will display FizBuzz program and exits with an error.
- A program containing any operator but no numbers will display
Hello World!and exit with an error
- A program consisting of any alphabets will output the 12 days of Chrismats and exit with an error
- Advanced logic flow (ternary operator, if/else/elif)
- Improved functions