Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
IF <condition> THEN
<code to be executed>
ELSE
<code to otherwise be executed>
ENDIFIF num1 = 3 THEN
OUTPUT "num1 is 3"
ELSE
OUTPUT "num1 isn't 3"
ENDIFIF num1 = 3 THEN
IF num2 = 3 THEN
OUTPUT "num1 and num2 are 3"
ELSE
OUTPUT "Only num1 is 3"
ENDIF
ELSE
IF num2 = 3 THEN
OUTPUT "Only num2 is 3"
ELSE
OUTPUT "Neither num1 or num2 is 3"
ENDIF
ENDIFCASE OF <variable>
<value1> : <code to be executed>
<value2> : <code to be executed>
etc...
ENDCASECASE OF num1
1 : OUTPUT "num1 is 1"
2 : OUTPUT "num1 is 2"
3 : OUTPUT "num1 is 3"
ENDCASECASE OF <variable>
<value1> : <code to be executed>
<value2> : <code to be executed>
etc...
OTHERWISE : <code to be executed>
ENDCASECASE OF num1
1 : OUTPUT "num1 is 1"
2 : OUTPUT "num1 is 2"
3 : OUTPUT "num1 is 3"
OTHERWISE : OUTPUT "num1 is not 1, 2 or 3"
ENDCASEDECLARE <variable name> : <data type>
INPUT <variable name>DECLARE num1 : INTEGER
INPUT num1OUTPUT <value>OUTPUT <value1>, <value2>, <value3>OUTPUT num1OUTPUT num1, num2, num3Introduction to Functions and Procedures
FUNCTION Add(num1 : INTEGER, num2 : INTEGER) RETURNS INTEGER
num3 <- num1 + num2
RETURN num3
ENDFUNCTIONPROCEDURE <procedure name>
<code to be executed>
ENDPROCEDUREPROCEDURE <procedure name>(<parameter1> : <data type>,
<parameter2> : <data type>...)
<code to be executed>
ENDPROCEDURECALL <procedure name>CALL <procedure name>(<parameter1>, <parameter2>, ...)PROCEDURE Add(num1 : INTEGER, num2 : INTEGER)
num3 <- num1 + num2
OUTPUT num3
ENDPROCEDURE
CALL Add(10, 5)WHILE num1 < 5
num1 <- num1 + 1
ENDWHILEREPEAT
<code to be executed>
UNTIL <condition>DECLARE <variable name> : <data type>DECLARE num1 : INTEGERDECLARE num1, num2, num3 : INTEGERnum1 <- 3DECLARE <array name> : ARRAY [<lower bound>:<upper bound>] OF <data type>DECLARE myArray : ARRAY[0:100] OF INTEGERDECLARE <array name> ARRAY [<1ower bound 1>:<upper bound 1>, <1ower bound 1>:<upper bound 2>] OF <data type>DECLARE my2DArray ARRAY [0:100, 0:1] OF CHARDECLARE myArray : ARRAY[0:100] OF INTEGER
myArray[19] <- 29DECLARE my2DArray ARRAY [0:100, 0:1] OF CHAR
my2DArray[12, 1] <- 'B'REPEAT
num1 <- num1 + 1
UNTIL num1 = 10FOR <integer variable> TO <desired limit>
<code to be executed>
NEXT <integer variable that was used>FOR x <- 1 TO 10
OUTPUT x
NEXT xFOR <variable> TO <limit> STEP <increment>
<code to be executed>
NEXT <variable>Introduction to Records
TYPE <data type name>
DECLARE <item1> : <type>
DECLARE <item2> : <type>
...
ENDTYPETYPE Person
DECLARE FirstName : STRING
DECLARE LastName : STRING
DECLARE FavFood : STRING
DECLARE Age : INTEGER
ENDTYPE
DECLARE Friend1 : Person
Friend1.FirstName <- "Jack"
Friend1.LastName <- "Pollier"
Friend1.FavFood <- "Lasagna"
Friend1.Age <- 17$ git clone git@github.com:PutYourUsernameHere/editor.git$ git clone git@github.com:PutYourUsernameHere/docs.git$ git checkout -b name-of-your-bugfix-or-feature$ npx rollup -c$ node index.js$ git add .
$ git commit -m "Your detailed description of your changes."
$ git push origin name-of-your-bugfix-or-feature