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

26 lines · 460 bytes Raw Blame History
1note run-time pools: a grow inside a block (while, if), doubling as the index reaches the length; every
2note value written before a grow is read back after the later grows moved the pool
3global P ulong *
4fn main to int
5i = ulong 0
6while lt i 100000
7if ge i len P
8r = enlarge P add mul len P 2 1
9if ne r 0
10ret 2
11end
12end
13put P i i
14i = add i 1
15end
16t = ulong 0
17j = ulong 0
18while lt j 100000
19t = add t get P j
20j = add j 1
21end
22if ne t 4999950000
23ret 1
24end
25ret 7
26end