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-bridge/blob/main/tests/freest-fixtures/scalar.om # omega-bridge Omega-first language interoperability: checked conversion backends and native language bindings 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-bridge / tests / freest-fixtures / scalar.om` 23 lines ยท 469 bytes Raw Blame History 1 note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 2 note Arbitrary names, constants, nested calls, branch locals, signed comparisons and wrap. 3 const STEP ulong 1 4 fn upper x uint to ulong 5 ret ulong add x uint 1 6 end 7 fn choose x long to long 8 if lt x long 0 9 ret long -1 10 else 11 ret long 1 12 end 13 end 14 fn portable_scalar value uint signedv long to ulong 15 v = upper value 16 if lt choose signedv long 0 17 narrow = uchar 7 18 v = add v ulong narrow 19 else 20 v = add v STEP 21 end 22 ret v 23 end