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 / g8b.om

50 lines · 897 bytes Raw Blame History
1note gate-pools 8: n times the element size at or past 2^63 is -22 with nothing changed; just below it the
2note host refuses (-12).
3global P ulong *
4global U uchar *
5global ob uchar 24
6fn pnum v ulong to void
7put ob 23 10
8i = ulong 23
9x = v
10go = true
11while go bound 21
12i = sub i 1
13put ob i uchar add rem x 10 48
14x = div x 10
15go = ne x 0
16end
17k = write 1 ob i sub 24 i
18end
19fn plong v long to void
20if lt v 0
21put ob 0 uchar 45
22k = write 1 ob 0 1
23pnum ulong neg v
24else
25pnum ulong v
26end
27end
28fn main to int
29r = enlarge P ulong 1152921504606846976
30plong r
31pnum len P
32r = enlarge P ulong 18446744073709551615
33plong r
34r = enlarge P ulong 1152921504606846975
35plong r
36pnum len P
37r = enlarge U ulong 9223372036854775808
38plong r
39r = enlarge U ulong 9223372036854775807
40plong r
41pnum len U
42r = enlarge P ulong 3
43plong r
44put P 2 11
45r = enlarge P ulong 2305843009213693952
46plong r
47pnum len P
48pnum get P 2
49ret 5
50end