Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/blob/main/seed/host/tests/random.om # 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 Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / seed / host / tests / random.om` 40 lines ยท 504 bytes Raw Blame History 1 note random A off n flags: exact byte count, not all zero, two calls differ, invalid flags negative. 2 fn main to int 3 a = new uchar 8 0 4 r = random a 0 8 0 5 if ne r 8 6 ret 1 7 end 8 i = ulong 0 9 z = ulong 1 10 while lt i 8 11 if ne get a i 0 12 z = ulong 0 13 end 14 i = add i 1 15 end 16 if eq z 1 17 ret 2 18 end 19 b = new uchar 8 0 20 r = random b 0 8 0 21 if ne r 8 22 ret 3 23 end 24 i = ulong 0 25 same = ulong 1 26 while lt i 8 27 if ne get a i get b i 28 same = ulong 0 29 end 30 i = add i 1 31 end 32 if eq same 1 33 ret 4 34 end 35 r = random a 0 8 8 36 if ge r 0 37 ret 5 38 end 39 ret 0 40 end