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 / rung4 / tests / t_env.om

30 lines · 534 bytes Raw Blame History
1note envcnt and envread (OMEGESE 10 host words, om4 knows them for omc.om): every entry of the environment is read
2note back (a NAME=VALUE with its = sign), whatever the environment holds; then the index envcnt traps 3 (status 103)
3global b uchar 131072
4fn main to int
5n = envcnt
6if lt n 0
7ret 1
8end
9i = ulong 0
10while lt i ulong n
11k = envread i b 0 131072
12if lt k 1
13ret 2
14end
15eq1 = false
16j = ulong 0
17while lt j ulong k
18if eq get b j 61
19eq1 = true
20end
21j = add j 1
22end
23if not eq1
24ret 3
25end
26i = add i 1
27end
28k = envread i b 0 1
29ret 4
30end