interplane.Get Omega
Read in your language

omega-harness

Agent skills for operating, encoding and communicating in Omega (.om) and the AIEN repositories

Brought by drakestapleton

branch main Branches Tags History

omega-harness / examples / om2_param_slots.om

24 lines · 606 bytes Raw Blame History
1note om2_param_slots: six parameter slots; an unsized view T * or edit T * takes two (pointer, count), every other parameter one
2note here 2 unsized views (4 slots) plus 2 scalars fill all six; a sized view uchar 4 would take one slot
3om2
4fn f a view uchar * b view uchar * x int y int to int
5ret int add add len a len b ulong add x y
6end
7fn g a view uchar 4 b view uchar 4 c view uchar 4 x int y int z int to int
8ret add add x y z
9end
10fn main to int
11a = new uchar 4 0
12b = new uchar 3 0
13c = new uchar 4 0
14d = new uchar 4 0
15r = f a b 1 2
16if ne r 10
17ret 1
18end
19s = g a c d 1 2 3
20if ne s 6
21ret 2
22end
23ret 0
24end