omega-harness
Agent skills for operating, encoding and communicating in Omega (.om) and the AIEN repositories
Brought by drakestapleton
omega-harness / coder / observed / elif_is_assignment.om
| 1 | note probe: `elif COND` is not a keyword. It compiles as an assignment to a new local named elif, and the |
| 2 | note line after it runs whenever the if arm runs. With x = 1 an elif chain would return 1; this returns 2. |
| 3 | fn main to int |
| 4 | x = ulong 1 |
| 5 | r = int 0 |
| 6 | if lt x 2 |
| 7 | r = int 1 |
| 8 | elif lt x 5 |
| 9 | r = int 2 |
| 10 | else |
| 11 | r = int 3 |
| 12 | end |
| 13 | ret r |
| 14 | end |