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-rosetta/blob/main/tasks/loops-for/loops-for.om # omega-rosetta aien-dev/omega-rosetta 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-rosetta / tasks / loops-for / loops-for.om` 26 lines ยท 523 bytes Raw Blame History 1 note Rosetta Code task "Loops/For": https://rosettacode.org/wiki/Loops/For 2 note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 3 om2 4 text nl "\n" 5 text star "*" 6 note emit writes every byte of a to stdout; a short write is retried, an error exits 1 7 fn emit a view uchar * to void 8 o = ulong 0 9 while lt o len a bound 4096 10 k = write 1 a o sub len a o 11 if le k 0 12 exit 1 13 end 14 o = add o ulong k 15 end 16 end 17 note row i has i + 1 stars, five rows 18 fn main to int 19 for i ulong 5 20 for j ulong add i 1 21 emit star 22 end 23 emit nl 24 end 25 ret 0 26 end