interplane.Get Omega
Read in your language

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

branch main Branches Tags History

omega-mv / seed / ng / front / cases / nom_layout_order.om

28 lines · 515 bytes Raw Blame History
1note Layout put: the index and value calls run in omc's order. The trace global records them in decimal
2note digits (value 1, index 2). Exit is the trace.
3om2
4global tr ulong 1
5layout lo 8
6field a uchar 4 at 0 little
7field w ushort at 4 big
8field b byte at 6 little
9end
10fn vf to uchar
11put tr 0 add mul get tr 0 10 1
12ret 7
13end
14fn ix to ulong
15put tr 0 add mul get tr 0 10 2
16ret 3
17end
18fn setit c edit lo to void
19put c a ix vf
20end
21fn main to int
22c = new uchar 8 0
23setit c
24if ne get c 3 7
25ret 1
26end
27ret int get tr 0
28end