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 / tests / quantity / contexts.om
| 1 | global g qty 4 |
| 2 | fn identity x qty to qty |
| 3 | ret x |
| 4 | end |
| 5 | fn literal to qty |
| 6 | ret 5 |
| 7 | end |
| 8 | fn main to int |
| 9 | a = new qty 4 0 |
| 10 | put a 1 5 |
| 11 | put g 1 5 |
| 12 | q = qty 1 |
| 13 | if ne get a q qty 5 |
| 14 | ret 1 |
| 15 | end |
| 16 | if ne get g q qty 5 |
| 17 | ret 2 |
| 18 | end |
| 19 | if ne identity 5 literal |
| 20 | ret 3 |
| 21 | end |
| 22 | if ne identity qty 5 literal |
| 23 | ret 4 |
| 24 | end |
| 25 | ret 0 |
| 26 | end |