EXAPUNKS

EXAPUNKS

View Stats:
Page 29 of Trash World News #2
... NOW YOU TELL ME?

basically, it tells you that there's a native for loop syntax
< >
Showing 1-5 of 5 comments
if you're talking about the @REP N ... @END syntax, i don't think it does exactly what you think it does. take another look at the examples, and try stepping through some examples in the game. it's basically just a way to save you from copying & pasting the same set of insns.
Not quite. It's more of "okay, you know the basics, so here's a helper" and it _can_ help make your earlier solutions a little more efficient... but it's not the silver bullet you're thinking of. Re-read Page 28, and compare the two examples. You're basically getting a slightly cleaner syntax to generate the unrolled example on the right.
there is no difference in efficiency if you define it in terms of cycle or insn count. if you define it in terms of line count for humans to read, then sure.
The rep syntax isn't any more or less efficient, you're absolutely right; I was more referring to the unrolling of loops as a general concept, which rep just makes more readable for us humans as you noted :)
Yeah it doesn't do anything in terms of code efficiency, but knowing this syntax saves me some "brain space" that makes figuring out the rest of the puzzle easier
< >
Showing 1-5 of 5 comments
Per page: 1530 50