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-mcp/blob/main/data/examples/arith.om # omega-mcp aien-dev/omega-mcp Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mcp / data / examples / arith.om` 39 lines ยท 481 bytes Raw Blame History 1 note signed and unsigned arithmetic, bit operations, comparisons and not 2 fn main to int 3 a = int 17 4 b = int 5 5 s = add a b 6 s = sub s mul a b 7 s = add s div a b 8 s = add s rem a b 9 x = uint 12 10 x = and x 10 11 x = or x 3 12 x = xor x 6 13 x = shl x 2 14 x = shr x 1 15 n = neg s 16 k = int 0 17 if eq n 58 18 k = add k 1 19 end 20 if ne a b 21 k = add k 1 22 end 23 if lt b a 24 k = add k 1 25 end 26 if le a 17 27 k = add k 1 28 end 29 if gt a b 30 k = add k 1 31 end 32 if ge b 5 33 k = add k 1 34 end 35 if not lt a b 36 k = add k 1 37 end 38 ret add add n int x k 39 end