See WebL Core Operators lists the operators belonging to the WebL core. To illustrate how operators are overloaded, we use a functional notation even though the operators are written in infix, prefix, or right-bracket fix. For example,
denotes that an infix operator op takes a first operand of x of type T and a second operand y of type S, and returns a value of type U. Unary operators have only a single argument to specify.
|
+(x: int, y: int): int |
|
|
+(x: char, y: string): string |
|
|
-(x: int, y: int): int |
|
|
*(x: int, y: int): real |
|
|
/(x: int, y: int): int |
|
|
C(x: int, y: int): bool |
|
|
Value equality test. See Value Equality |
|
|
Value in-equality test. See Value Equality |
|
|
[](x: list, i: int): any |
List, object, and string indexing 1 . Elements in a list and string are numbered from 0 to Size-1. |
|
member(x, s: set): bool |
Set, list and object 2 membership test. |