You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -98,10 +98,10 @@ White spaces are not significant and will be ignored (except inside strings).
98
98
99
99
- Integers and floating point numbers can be mixed in all operations. If an operation involves an integer and a floating point number, the integer number is first converted to floating point before the operation. Available operations: `+`, `-`, `*`, `/`, `%` (modulo), `**` (exponentiation/power). Integer division/modulo by zero and integer overflow will raise an error.
100
100
- Numbers can also be tested for equality (`==` and `!=`) and compared for ordering (`>`, `>=`, `<`, `<=`), with the same conversion rules.
101
-
- Strings can be concatenated with `+`. They can be tested for equality and compared for ordering (using simple alphabetical ordering). Individual characters can be accessed with angled brackets (`'str'[0]`); the index must be an integer, and is zero-based (first character had index zero). Range access is also possible with `str[a:b]` (`a` is the index of the first character to extract, and `b` is 1 plus the index of the last character to extract, so `'abc'[0:2]` is `'ab'`; an empty string is returned if `a >= b`).
101
+
- Strings can be concatenated with `+`. They can be tested for equality and compared for ordering (using simple alphabetical ordering). Individual characters can be accessed with square brackets (`'str'[0]`); the index must be an integer, and is zero-based (first character had index zero). Range access is also possible with `str[a:b]` (`a` is the index of the first character to extract, and `b` is 1 plus the index of the last character to extract, so `'abc'[0:2]` is `'ab'`; an empty string is returned if `a >= b`).
102
102
- Booleans can only be tested for equality, and combined with the boolean operators `and` and `or`. The boolean operators are "short-circuiting"; namely, when evaluating `a and b` and `a` evaluates to `false`, `b` will not be evaluated. This allows bypassing evaluation of operations that would otherwise be invalid (e.g. accessing elements beyond the length of an array). Finally, booleans can also be negated (`not a`). No other operation is possible.
103
-
- Arrays can only be tested for equality. Individual elements can be accessed with angled brackets (`[1,2,3][0]`); the index must be an integer, and is zero-based (first character had index zero). Range access is also possible with `arr[a:b]` (`a` is the index of the first element to extract, and `b` is 1 plus the index of the last element to extract, so `[1,2,3][0:2]` is `[1,2]`; an empty array is returned if `a >= b`).
104
-
- Object can only be tested for equality. Sub-objects (or fields, or values) can be accessed with angled brackets (`{'a':1}['a']`); the index must be a string. Equivalently, sub-objects can also be accessed with a single dot (`{'a':1}.a`).
103
+
- Arrays can only be tested for equality. Individual elements can be accessed with square brackets (`[1,2,3][0]`); the index must be an integer, and is zero-based (first character had index zero). Range access is also possible with `arr[a:b]` (`a` is the index of the first element to extract, and `b` is 1 plus the index of the last element to extract, so `[1,2,3][0:2]` is `[1,2]`; an empty array is returned if `a >= b`).
104
+
- Object can only be tested for equality. Sub-objects (or fields, or values) can be accessed with square brackets (`{'a':1}['a']`); the index must be a string. Equivalently, sub-objects can also be accessed with a single dot (`{'a':1}.a`).
105
105
- Null values can only be tested for equality with null itself (always true) and values of other types (always false). No other operation is possible.
106
106
107
107
In addition to the above, the following generic operators are also available:
0 commit comments