Operators

Every Operator

There are many operators in ArrEx. Here is a table of them.

NameSymbolUseCodeComments
Plus+Adding numbers, strings, or arrays1 + 23
Minus-Subtracting numbers2 - 11, can be used for negation as in -3
Multiplication*Multiplying numbers2 * 36
Division/Dividing numbers5 / 41.25
Parenthesis()Prioritize code or denotes function code3 / (1 + 4)0.6
Curly Brackets{}Prioritize code and make function parameters more readable3 / {1 + 4}0.6
Exponent^Exponentiation2 ^ 38
Modulus%Getting the remainder15 % 21
Int Division//Gets the int part in division5 // 22, useful for making numbers integers
Equal==Checking equality between values5 == 2False
Not Equal!=Checking inequality between values5 != 2True
Greater than>Checking if a number is bigger than another5 > 2True
Less than<Checking if a number is smaller than another5 < 2False
Greater than or equal>=Checking if a number is bigger than or equal to another3 >= 3True
Less than or equal<=Checking if a number is smaller than or equal to another3 <= 3True
Boolean Not!Negates a boolean!TFalse
Comma,Separates certain code in some functionsar(1, 2, 3, 4 )[1, 2, 3 ,4], ar makes an array
Type equal~=Checks if a value is a type3 ~= tnTrue, tn means number type
In_Checks if a value is in an array3_ar(1, 2, 3, 4)True
Count#Checks how many times a value occurs in an array3#ar(1, 2, 3, 4, 3, 5)2
At@Checks where a value is in an array3@ar(1, 2, 3, 4)2
Skim>>Removes all instances of a value in an arrayar(1, 2, 3, 4) >> 2[1, 3, 4]
Conditional If? :Does something different depending on if something is true or not3 == 3 ? 50 : 2050

Order of Operations

There is an order of operations that the operators work in.

PrecedenceOperators
1? :, (), {}
2_, #, @, >>
3^
4*, /, %, //
5+ - (includes negation)
6!
7~=, >, <, >=, <=, ==, !=
8&, |

Constants and Variables

Custom Functions