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
The MEMBERSETTER ternary operator (whose header accepts 2 parameters) public .=(name: string, amount: Money): void
Special Case: The indexSet operator can be registered to accept 2 or more parameters, with the last one being the value being set and all before the (multi-dim) indices
public []=(index: usize, value: bool): void
is called using flags[10] = true;
public []=(x: usize, y: usize: value: bool): void
is called using quadrantChecked[1, 3] = true
...
If a user writes a script where they attempt to create an operator with an invalid parameter count, then the validator should log an error and no scripts should be executed.
CompileExceptionCode: INVALID_PARAMETER_COUNT
Message: "operator parameter count mismatched, X operator only supports Y paremters"
public +(other asint, other_other asint) {
}
Acceptance criteria:
For each below, write two tests, one that creates the operator with the proper parameters and has the script executed, and one that uses an invalid number of parameters and therefore fails
ADD
SUB
MUL
DIV
MOD
CAT
OR
AND
XOR
NEG
INVERT
NOT
INDEXSET (with 1 index variable, 2 index variables and check if overload of is possible)
INDEXGET
CONTAINS
COMPARE
EQUALS
NOTEQUALS
SHL
SHR
MEMBERGETTER Operator not yet implemted, this is outside the scope of this task
MEMBERSETTER Operator not yet implemted, this is outside the scope of this task
The text was updated successfully, but these errors were encountered:
Currently, it is possible to define an operator with any number of arguments.
However, we only support the operators:
public !(): Money
public +(other: Money): Money
public .=(name: string, amount: Money): void
public []=(index: usize, value: bool): void
is called using
flags[10] = true;
public []=(x: usize, y: usize: value: bool): void
is called using
quadrantChecked[1, 3] = true
If a user writes a script where they attempt to create an operator with an invalid parameter count, then the validator should log an error and no scripts should be executed.
CompileExceptionCode: INVALID_PARAMETER_COUNT
Message: "operator parameter count mismatched, X operator only supports Y paremters"
Acceptance criteria:
MEMBERGETTEROperator not yet implemted, this is outside the scope of this taskMEMBERSETTEROperator not yet implemted, this is outside the scope of this taskThe text was updated successfully, but these errors were encountered: