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_short_refuse.om

15 lines · 352 bytes Raw Blame History
1note Layout view over a buffer shorter than the layout: omc refuses at compile time (error 7). The buffer's
2note length is known, so the call is rejected before any field is read.
3om2
4layout lo 8
5field a uint at 0 little
6field b uint at 4 little
7end
8fn rd c view lo to uint
9ret get c b
10end
11fn main to int
12c = new uchar 6 1
13r = rd c
14ret int ulong r
15end