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 / omc / tests / pools / g2d.om

36 lines · 560 bytes Raw Blame History
1note gate-pools 2: a read or write slice past the length traps 3 (uchar pool, write path).
2global U uchar *
3global ob uchar 24
4fn pnum v ulong to void
5put ob 23 10
6i = ulong 23
7x = v
8go = true
9while go bound 21
10i = sub i 1
11put ob i uchar add rem x 10 48
12x = div x 10
13go = ne x 0
14end
15k = write 1 ob i sub 24 i
16end
17fn plong v long to void
18if lt v 0
19put ob 0 uchar 45
20k = write 1 ob 0 1
21pnum ulong neg v
22else
23pnum ulong v
24end
25end
26fn main to int
27r = enlarge U ulong 3
28put U 0 79
29put U 1 75
30put U 2 10
31k = write 1 U 0 3
32n = len U
33k = write 1 U 1 n
34pnum 9
35ret 0
36end