-
Notifications
You must be signed in to change notification settings - Fork 0
Basic Operations
This page covers basic XCSL operations that can be performed on data. The definitions for these operations are always included with a standard XCS installation.
- Arithmetic
- Bitwise Operators
- Logical Operators
- Character/String Operations
- List Operations
For the sake of consistency/usability, all literal arithmetic will result in the value: 8
Literals
4 + 4
Variables
x + y
Literals
11 - 3
Variables
x - y
Literals
4 * 2
Variables
x * y
Literals
16 / 2
Variables
x / y
Literals
17 % 9
Variables
x % y
Literals
1 << 3
Variables
x << y
Literals
16 >> 1
Variables
x >> y
Literals
15 & 8
Variables
x & y
Literals
8 | 0
Variables
x | y
Literals
15 ^ 7
Variables
x ^ y
Logical operations always result in True
or False
. For demonstration purposes, the result of all literal operations will be True
.
Literals
True && True
Variables
x && y
Literals
True || False
Variables
x || y
Literals
False ^^ True
Variables
x ^^ y
Literals
3 < 5
Variables
x < y
Literals
5 <= 5
Variables
x <= y
Literals
7 > 5
Variables
x > y
Literals
6 >= 6
Variables
x >= y
Literals
False == False
1 == 1
Variables
x == y
Literals
True != False
1 != 2
Variables