-
- Integer: a positive or negative whole number capable of being represented with 32 bits.
- Booleans: the keywords
true
andfalse
with their respective meaning.
-
-
<variable name 1>
::Int
: Declares an Integer value. -
<variable name 2>
::Bool
: Declares a Boolean value. -
<variable name 3>
::Array{Int}(
<size>)
: Declares a Integer array of size <size>. -
<variable name 4>
::Array{Bool}(
<size>)
: Declares a Boolean array of size <size>. -
<variable name 1>
::Int =
<Integer or Boolean>: Declares and initializes an Integer value. -
<variable name 2>
::Bool =
<Boolean>: Declares and initializes an Boolean value. -
<variable name 3>
::Array{Int} = [<value-1\>, <value-2\>, <value-n\>]
: Declares a Integer array of size n. -
<variable name 4>
::Array{Bool} = [<value-1\>, <value-2\>, <value-n\>]
: Declares a Boolean array of size n.
-
-
-
<variable name 1> : Gets the Integer value.
-
<variable name 2> : Gets the Boolean value.
-
<variable name 3>
[
<offset>]
: Gets the Integer value at offset <offset>; Index starts from 1. -
<variable name 4>
[
<offset>]
: Gets the Boolean value at offset <offset>; Index starts from 1. -
<variable name 1>
=
<Integer or Boolean>: Sets the Integer value. -
<variable name 2>
=
<Boolean>: Sets the Boolean value. -
<variable name 3>
[
<offset>]
: Sets the Integer value at offset <offset>; Index starts from 1. -
<variable name 4>
[
<offset>]
: Sets the Boolean value at offset <offset>; Index starts from 1.
-
-
#
: single line comment. Ends when reaching new line or end of file.#=
<comment>=#
: multiline comment. Comment between start symbol(#=
) and end symbol (=#
)
-
print
: prints parametersprintln
: prints parameters and new line at the end
-
- Literal: a string literal encapsulated by double quoutes, may contain escape characters. For example:
"Hello World!"
.-
\\
: Adds a\
to the string\"
: Adds a"
to the string\t
: Adds a tabulation to the string\n
: Adds a new line to the string
-
- Integers: any expression resulting in an integer.
- Booleans: any expression resulting in a boolean.
- Literal: a string literal encapsulated by double quoutes, may contain escape characters. For example:
-
+
: Addition-
: Subtraction*
: Multiplication/
: Division%
: Modularization^
: Exponentiation
-
- <Integer or Boolean Value> <Operator> <Integer or Boolean Value> : Returns result of operation
-
- Any operation will result in an Integer
-
>
: Greater than<
: Less than==
: Equal to>=
: Greater than or Equal to<=
: Less than or Equal to!=
: Not Equal to
-
- <Integer or Boolean Value> <Operator> <Integer or Boolean Value> : Returns result of operation
-
!
: Negation of
-
- <Operator> <Boolean Value> : Returns result of operation
-
- Any operation will result in a Boolean
-
|
: OR&
: AND$
: XOR<<
: Arithmetic Shift Left>>
: Arithmetic Shift Right>>>
: Logical Shift Right
-
- <Integer or Boolean Value> <Operator> <Integer or Boolean Value> : Returns result of operation
-
~
: NOT
-
- <Operator> <Integer or Boolean Value> : Returns the
false
if true andtrue
if false.
- <Operator> <Integer or Boolean Value> : Returns the
-
|
: Boolean if both values are boolean, else Integer&
: Boolean if both values are boolean, else Integer$
: Boolean if both values are boolean, else Integer<<
: Integer>>
: Integer>>>
: Integer~
: Boolean if value is boolean, else Integer
-
if
<condition> <statements>elseif
<condition> <statements>else
<statements>end
-
if
must be firstelseif
andelse
sentences are optional- if there is an
else
it must be last - executes code if condition is true
- conditionals can only be of type Boolean