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/bridge/omega-bridge/tests/native/freestanding/pathlen.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 / bridge / omega-bridge / tests / native / freestanding / pathlen.om` 15 lines ยท 416 bytes Raw Blame History 1 note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 2 om2 3 note pathlen: bounded borrowed-byte length. Never reads past len a. The first 0 ends the scan. 4 note An empty view (len 0), including a NULL pointer, is length 0. A nonempty NULL is refused by the binding, not here. 5 export fn pathlen a view uchar * to ulong 6 ensures le result len a 7 n = len a 8 for i ulong n 9 b = get a i 10 if eq b 0 11 ret i 12 end 13 end 14 ret n 15 end