Checks two values for equality.
| Type | Value |
| Input | Any | a value |
| other (param #1) | Any | another value |
| Output | Bool | true if the input is the same as other, false otherwise |
| Program | Type | Value | Error |
null ==null | Bool | true | |
null =={} | Bool | false | |
true ==true | Bool | true | |
true ==false | Bool | false | |
true ==[] | Bool | false | |
1 ==1.0 | Bool | true | |
1 ==2 | Bool | false | |
57 =="a" | Bool | false | |
"abc" =="abc" | Bool | true | |
"" =="abc" | Bool | false | |
"" ==null | Bool | false | |
[false, 1.0, "ab"] ==[false, 1, "a" +"b"] | Bool | true | |
[] ==[11] | Bool | false | |
["a"] =={a: 1} | Bool | false | |
{a: 1, b: 2} =={b: 2, a: 1} | Bool | true | |
{a: 1, b: 2} =={a: 2, b: 1} | Bool | false | |
{} ==[] | Bool | false | |
The identity function.
| Type | Value |
| Input | <A Any> | any value |
| Output | <A Any> | the input value |
| Program | Type | Value | Error |
123 id | Num | 123 | |
"abc" id | Str | "abc" | |
false if id then 1 else fatal ok | Num | "abc" | {"Code":"UnexpectedValue","GotValue":"false","Kind":"Value"} |
Parses the string representation of a floating-point number.
| Type | Value |
| Input | Str | a floating-point number in string representation |
| Output | Num | the corresponding Num value |
| Program | Type | Value | Error |
"4.567" parseFloat | Num | 4.567 | |
"4.567e3" parseFloat | Num | 4567 | |
"4.567abcdefgh" parseFloat | Num | | {"Code":"UnexpectedValue","GotValue":"\"4.567abcdefgh\"","Kind":"Value"} |
Parses the string representation of an integer number.
| Type | Value |
| Input | Str | an integer number in string representation |
| base (param #1) | Num | the base that the input is in |
| Output | Num | the corresponding Num value |
| Program | Type | Value | Error |
"123" parseInt(10) | Num | 123 | |
"ff" parseInt(10) | Num | | {"Code":"UnexpectedValue","GotValue":"\"ff\"","Kind":"Value"} |
"ff" parseInt(16) | Num | 255 | |
"0xFF" parseInt(16) | Num | 255 | {"Code":"UnexpectedValue","GotValue":"\"0xFF\"","Kind":"Value"} |
Parses the string representation of a base-10 integer number.
| Type | Value |
| Input | Str | an integer number in base-10 string representation |
| Output | Num | the corresponding Num value |
| Program | Type | Value | Error |
"123" parseInt | Num | 123 | |
" 123 " parseInt | Num | 123 | {"Code":"UnexpectedValue","GotValue":"\" 123 \"","Kind":"Value"} |
"077" parseInt | Num | 77 | |
"1.9" parseInt | Num | 1 | {"Code":"UnexpectedValue","GotValue":"\"1.9\"","Kind":"Value"} |
"ff" parseInt | Num | 16 | {"Code":"UnexpectedValue","GotValue":"\"ff\"","Kind":"Value"} |
"xyz" parseInt | Num | 16 | {"Code":"UnexpectedValue","GotValue":"\"xyz\"","Kind":"Value"} |
| Type | Value |
| Input | Str | |
| Output | Any | |
| Type | Value |
| Input | Any | |
| Output | Str | |
| Type | Value |
| Input | Arr<Arr<Str, <A Any>>...> | |
| Output | Obj<<A Any>> | |
| Type | Value |
| Input | Any | |
| Output | Str | |