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/drafts/rosettacode/repeat-a-string.wiki # 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 / drafts / rosettacode / repeat-a-string.wiki` 43 lines ยท 885 bytes Raw Blame History 1 =={{header|Omegese}}== 2 {{works with|omc|sha256 `2c824805`, aien-dev/omega-mv `e5b32567`, Linux AArch64}} 3 Omega has no imports, so the small output helpers (emit and friends) are part of the program. 4 5 om2 6 text nl "\n" 7 text ha "ha" 8 text star "*" 9 note emit writes every byte of a to stdout; a short write is retried, an error exits 1 10 fn emit a view uchar * to void 11 o = ulong 0 12 while lt o len a bound 4096 13 k = write 1 a o sub len a o 14 if le k 0 15 exit 1 16 end 17 o = add o ulong k 18 end 19 end 20 note repeat writes a, k times, into one buffer (up to 256 bytes, more traps 3) and prints it 21 fn repeat a view uchar * k ulong to void 22 b = new uchar 256 0 23 p = ulong 0 24 for j ulong k 25 for i ulong len a 26 put b p get a i 27 p = add p 1 28 end 29 end 30 emit part b 0 p 31 emit nl 32 end 33 fn main to int 34 repeat ha 5 35 repeat star 5 36 ret 0 37 end 38 39 {{out}} 40

41 hahahahaha

42 *****

43