Looks like JavaScript, feels like Ruby, and it is a script language fitting in C programmers.
This project is maintained by Kray-G
Comparison operators are <
, >
, <=
, and >=
.
var a = 0x05;
var b = a < 0x06; // 5 < 6 => true means 1
<
function test(label, func, a, b) {
return ":: %8d %s %8d => %d" % a % label % b % func(a, b);
}
System.println(test("<", &(a, b) => a < b, 0x05, 0x06));
System.println(test("<", &(a, b) => a < b, 99, 99));
System.println(test("<", &(a, b) => a < b, 100, 11));
System.println(test("<", &(a, b) => a < b, null, 0x05));
System.println(test("<", &(a, b) => a < b, 0x07, null));
:: 5 < 6 => 1
:: 99 < 99 => 0
:: 100 < 11 => 0
:: ((null)) < 5 => 1
:: 7 < ((null)) => 0
<=
function test(label, func, a, b) {
return ":: %8d %s %8d => %d" % a % label % b % func(a, b);
}
System.println(test("<=", &(a, b) => a <= b, 0x05, 0x06));
System.println(test("<=", &(a, b) => a <= b, 99, 99));
System.println(test("<=", &(a, b) => a <= b, 100, 11));
System.println(test("<=", &(a, b) => a <= b, null, 0x05));
System.println(test("<=", &(a, b) => a <= b, 0x07, null));
:: 5 <= 6 => 1
:: 99 <= 99 => 1
:: 100 <= 11 => 0
:: ((null)) <= 5 => 1
:: 7 <= ((null)) => 0
>
function test(label, func, a, b) {
return ":: %8d %s %8d => %d" % a % label % b % func(a, b);
}
System.println(test(">", &(a, b) => a > b, 0x05, 0x06));
System.println(test(">", &(a, b) => a > b, 99, 99));
System.println(test(">", &(a, b) => a > b, 100, 11));
System.println(test(">", &(a, b) => a > b, null, 0x05));
System.println(test(">", &(a, b) => a > b, 0x07, null));
:: 5 > 6 => 0
:: 99 > 99 => 0
:: 100 > 11 => 1
:: ((null)) > 5 => 0
:: 7 > ((null)) => 1
<=
function test(label, func, a, b) {
return ":: %8d %s %8d => %d" % a % label % b % func(a, b);
}
System.println(test(">=", &(a, b) => a >= b, 0x05, 0x06));
System.println(test(">=", &(a, b) => a >= b, 99, 99));
System.println(test(">=", &(a, b) => a >= b, 100, 11));
System.println(test(">=", &(a, b) => a >= b, null, 0x05));
System.println(test(">=", &(a, b) => a >= b, 0x07, null));
:: 5 >= 6 => 0
:: 99 >= 99 => 1
:: 100 >= 11 => 1
:: ((null)) >= 5 => 0
:: 7 >= ((null)) => 1
<
const BI = 0x7fffffffffffffff + 2;
function test(label, func, a, b) {
return ":: %8d %s %8d => %d" % a % label % b % func(a, b);
}
System.println(test("<", &(a, b) => a < b, BI, 0x06));
System.println(test("<", &(a, b) => a < b, BI, BI));
System.println(test("<", &(a, b) => a < b, 100, BI));
System.println(test("<", &(a, b) => a < b, null, BI));
System.println(test("<", &(a, b) => a < b, BI, null));
:: 9223372036854775809 < 6 => 0
:: 9223372036854775809 < 9223372036854775809 => 0
:: 100 < 9223372036854775809 => 1
:: ((null)) < 9223372036854775809 => 1
:: 9223372036854775809 < ((null)) => 0
<=
const BI = 0x7fffffffffffffff + 2;
function test(label, func, a, b) {
return ":: %8d %s %8d => %d" % a % label % b % func(a, b);
}
System.println(test("<=", &(a, b) => a <= b, BI, 0x06));
System.println(test("<=", &(a, b) => a <= b, BI, BI));
System.println(test("<=", &(a, b) => a <= b, 100, BI));
System.println(test("<=", &(a, b) => a <= b, null, BI));
System.println(test("<=", &(a, b) => a <= b, BI, null));
:: 9223372036854775809 <= 6 => 0
:: 9223372036854775809 <= 9223372036854775809 => 1
:: 100 <= 9223372036854775809 => 1
:: ((null)) <= 9223372036854775809 => 1
:: 9223372036854775809 <= ((null)) => 0
>
const BI = 0x7fffffffffffffff + 2;
function test(label, func, a, b) {
return ":: %8d %s %8d => %d" % a % label % b % func(a, b);
}
System.println(test(">", &(a, b) => a > b, BI, 0x06));
System.println(test(">", &(a, b) => a > b, BI, BI));
System.println(test(">", &(a, b) => a > b, 100, BI));
System.println(test(">", &(a, b) => a > b, null, BI));
System.println(test(">", &(a, b) => a > b, BI, null));
:: 9223372036854775809 > 6 => 1
:: 9223372036854775809 > 9223372036854775809 => 0
:: 100 > 9223372036854775809 => 0
:: ((null)) > 9223372036854775809 => 0
:: 9223372036854775809 > ((null)) => 1
>=
const BI = 0x7fffffffffffffff + 2;
function test(label, func, a, b) {
return ":: %8d %s %8d => %d" % a % label % b % func(a, b);
}
System.println(test(">=", &(a, b) => a >= b, BI, 0x06));
System.println(test(">=", &(a, b) => a >= b, BI, BI));
System.println(test(">=", &(a, b) => a >= b, 100, BI));
System.println(test(">=", &(a, b) => a >= b, null, BI));
System.println(test(">=", &(a, b) => a >= b, BI, null));
:: 9223372036854775809 >= 6 => 1
:: 9223372036854775809 >= 9223372036854775809 => 1
:: 100 >= 9223372036854775809 => 0
:: ((null)) >= 9223372036854775809 => 0
:: 9223372036854775809 >= ((null)) => 1