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 / si / mcp / data / examples / limits.om

28 lines · 512 bytes Raw Blame History
1note prlimit reads and sets the open-file limit (res 7); a failed execenv (no such file) returns -2
2global lim uchar 32
3fn ck yes bool to void
4if not yes
5exit 80
6end
7end
8fn main to int
9ck eq prlimit 0 7 lim 0 16 0
10ck eq prlimit 0 7 lim 0 8 neg long 22
11ck eq prlimit 0 7 lim 0 32 0
12for i ulong 16
13ck eq get lim i get lim add i 16
14end
15x = new uchar 6 0
16put x 0 1
17put x 2 2
18put x 4 47
19put x 5 120
20e = new uchar 7 0
21put e 0 1
22put e 2 3
23put e 4 97
24put e 5 61
25put e 6 98
26ck eq execenv x 0 6 e 0 7 neg long 2
27ret 0
28end