omega-mv
Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.
Brought by drakestapleton
omega-mv / si / harness / skills / omega-encoding / examples / pitfall_elif.om
| 1 | note There is no elif. A line NAME VALUE assigns, so elif eq k 1 makes a local bool named elif |
| 2 | note and the next line runs for every k. pick 0 should be 10 and returns 20 (exit 20). |
| 3 | fn pick k ulong to ulong |
| 4 | r = ulong 0 |
| 5 | if eq k 0 |
| 6 | r = ulong 10 |
| 7 | elif eq k 1 |
| 8 | r = ulong 20 |
| 9 | end |
| 10 | ret r |
| 11 | end |
| 12 | fn main to int |
| 13 | ret int pick 0 |
| 14 | end |