AFL
Arguably Functional Language
AFL Documentation
Operators
AFL uses operators to describe basic operations, such as the + operator for addition. All Operators have two operands, to each side of them. AFL utilizes the order of operations, with certain operations being executed before others. This entry describes Each 'priority category' of operators from highest to lowest priority, with notes for certain operators when required.
Organize Category Operators
( and ) are Organize operators, but they do not correspond to any operations, and prioritize the expression inside of them, ensuring all of it is done as a unit. Parenthesees are also used to describe function calls, but are used in a slightly different capacity. Here is an example of parentheses used as organize operators:
4*2+3; # outputs 11 4*(2+3) # outputs 20
Multiply Category Operators
The multiply category operators are *, /, and %, and perform multiplication, division, and modulus (division remainders) respectively on num type operands.
Add Category Operators
The add category operators are + and -, and perform addition and subtraction respectively on num type operands. + can also utilize operands of other types, and if any operand of + is not a num, it will concatenate both types together and output a string.
Compare Category Operators
The compare category operators are ==, !=, >=, <=, >, and <. These operators return a boolean value. == and != compare equality and inequality respectively, and work on all types. >=, <=, >, and < compare greater than or equal to, less than or equal to, greater than, and less than respectively.
Logic Category Operators
The logic category operators are || and &, and perform boolean or and and operations. or returns true if either operand is true, and and returns true only if both operand are true.
Assignment Category Operators
= is the Assignment operator, which is used to assign variables. Refer to the entry on Variables for information on how it works.