Details
-
Story
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
Security Level: Users (General product issues)
-
5
-
UNDECIDED
-
Green Sprint 106, Green Sprint 107, Green Sprint 108
Description
String concatenation:
string s = <string expression> + <variant variable> | <variant variable> + <string expression>;
Example:
variant v = 1; printErr("Variant variable: " + v); // prints "Variant variable: 1"
Comparison operators:
bool <variant variable> == | != <any expression>
need to be extended to support comparison of variant variable with any expression. At the time of comparison execution, both the variant variable and the expression have to be of the same type (e.g. string/integer), otherwise false is returned.
Example:
variant val1 = 123; variant val2 = "ABC"; if (val2 == "ABC") { // do something } if (val1 == "ABC") { // returns false // }
Note: new <variable type literals> were introduced to CTL in order to support “variant”
integer, long, number, decimal, string, date. boolean, list, map, byte
"typeof" operator:
In addition introduce new operator bool <variant variable> typeof<variable type literal>
syntax: _varname_ typeof {one of variable type literal}
Example:
if (myvariant typeof string){ //do something } else if (myvariable typeof integer){ //do some else }
Attachments
Issue Links
1.
|
String concatenation |
|
Closed | Martin Predny (Inactive) |
2.
|
Comparison operators |
|
Closed | Martin Predny (Inactive) |
3.
|
"typeof" operator |
|
Closed | Martin Predny (Inactive) |
4.
|
Update documentation |
|
Closed | Martin Predny (Inactive) |
5.
|
Disable comparison operators for records |
|
Closed | Lukas Adamek |