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 / seed / omc / om2 / s4 / v-len.om
| 1 | note S4: len of an unsized name is a ulong value, not a number: `const`-like uses refuse it; |
| 2 | note here it is assigned and compared (exit 0 when len is 5). |
| 3 | om2 |
| 4 | fn g v view uchar * to ulong |
| 5 | n = len v |
| 6 | m = n |
| 7 | ret m |
| 8 | end |
| 9 | fn main to int |
| 10 | a = new uchar 5 0 |
| 11 | if ne g a 5 |
| 12 | ret 1 |
| 13 | end |
| 14 | ret 0 |
| 15 | end |