1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-02-12 11:12:16 +00:00
ton/tolk-tester
tolk-vm d110022731
[Tolk] Implement logical operators && ||
Unary logical NOT was already implemented earlier.
Logical AND OR are expressed via conditional expression:
* a && b  ->  a ? (b != 0) : 0
* a || b  ->  a ? 1 : (b != 0)
They work as expected in any expressions. For instance, having
`cond && f()`, f is called only if cond is true.
For primitive cases, like `a > 0 && b > 0`, Fift code is not optimal,
it could potentially be without IFs.
These are moments of future optimizations. For now, it's more than enough.
2024-11-02 03:44:14 +04:00
..
tests [Tolk] Implement logical operators && || 2024-11-02 03:44:14 +04:00
tolk-tester.js [Tolk] Completely rework stdlib: multiple files and renaming 2024-11-02 03:44:13 +04:00
tolk-tester.py [Tolk] v0.6 syntax: fun, import, var, types on the right, etc. 2024-11-02 03:44:13 +04:00