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/omc/om2/s4/p-ok.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 / omc / om2 / s4 / p-ok.om` 60 lines ยท 1088 bytes Raw Blame History 1 note S4 part (spec 6): parts of a local (an edit), of an unsized edit, of an unsized view and of a 2 note text; `view part` of an edit; an empty part at the end; a part passed to an inline function; o and k 3 note from calls. The callee sees len = k and elements o .. o+k-1. Exit 0 when every check holds. 4 om2 5 text msg "`0123456789`" 6 fn plen v view uchar * to ulong 7 ret len v 8 end 9 fn first v view uchar * to ulong 10 ret ulong get v 0 11 end 12 fn fill e edit uchar * c uchar to ulong 13 for i ulong len e 14 put e i c 15 end 16 ret add plen view part e 1 1 len e 17 end 18 fn ifirst v view uchar * to ulong inline 19 ret ulong get v 0 20 end 21 fn sub2 v view uchar * o ulong to ulong 22 ret first part v o 2 23 end 24 fn two to ulong 25 ret 2 26 end 27 fn main to int 28 a = new uchar 10 46 29 if ne fill part a 3 4 88 5 30 ret 1 31 end 32 if ne get a 2 46 33 ret 2 34 end 35 if ne get a 6 88 36 ret 3 37 end 38 if ne get a 7 46 39 ret 4 40 end 41 if ne first part msg 7 3 55 42 ret 5 43 end 44 if ne sub2 msg 4 52 45 ret 6 46 end 47 if ne plen part a 10 0 0 48 ret 7 49 end 50 if ne ifirst part msg 9 1 57 51 ret 8 52 end 53 if ne plen part a two add two 1 3 54 ret 9 55 end 56 if ne ifirst view part a 6 two 88 57 ret 10 58 end 59 ret 0 60 end