Eas (Easy Application Script) by Molaskes

Beyond Syntax:03. Operational Typecasting

Unset/undefined variables and array items as well as the pseudo-variables @ and @@ outside of appropriate loops equal the empty string "". Concatenation‌ typecasts all its operands to strings: - all numbers get rendered as -?\d+(\.\d+)? - arrays become "" Before appending to a non-array, the variable is set to an empty array. The comparisons = and # typecast all their operands to strings: - all numbers get rendered as -?\d+(\.\d+)? - arrays become their JSON rendering Mathematical operations (basic and bitwise) and the comparisons <, >, <= and >= typecast all their operands to numbers, simple loop iterations and the range loop from/to are typecast likewise: - the empty string "" becomes 0 - strings of a valid Eas numbers syntax become the number they represent - all other strings become 0 - arrays become 0 Foreach-loops‌ typecast subject numbers to strings: - all numbers get rendered as -?\d+(\.\d+)? Conditions and Boolean logic‌ typecast all their operands to numbers: - the empty string "" becomes 0 - the string "0" becomes 0 - all-whitespace strings \s+ become 0 - all other strings become 1 - arrays become 0
Preceding Page:
Invalid Math
Next Page:
Syntax Overview
D Download Eas 4B
C Contact
Esc Search / Table of Contents