SIMPLE is a basic programming langauge designed for golfing purposes.
Make sure to have node
installed. If you don't, head over to nodejs.org
and follow the installation instructions. Also make sure to have git installed.
Then run the following commands:
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 % 2
etc.. -
Supports addition, subtraction, multiplication, division, modulo (
%
), parenthesis. -
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 variablex
with a value of12
. -
Functions are declared with
Func nameOfFunc arg1 arg2 => ( return what ever )
, e.gFunc double x => x * 2
will make a functiondouble
that has an argumentx
and returns the results of the expressionx * 2
. Entering the expressiondouble 3
will expand to6
.
- 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
- Input/Output
- Advanced logic flow (ternary operator, if/else/elif)
- Improved functions
- Loops