Jump to content

User talk:Chunes: Difference between revisions

m
woops
m (woops)
Line 61:
When reading Loops/Downward, [https://rosettacode.org/wiki/Loops/Downward_for#Plain_English Loops Downward], I stumbled over the initial value being 11. Should be 10, I guess. Or do I miss something? Best regards. [[User:Cg|Cg]] ([[User talk:Cg|talk]]) 13:39, 10 Dec 2020 (CET)
 
:<code>If a counter is past a number</code> is a decider (boolean function) defined in the noodle that looks like this:
 
:<lang plainenglish>To decide if a counter is pastbelow a number:
AddSubtract 1 tofrom the counter.
If the counter is greaterless than the number, say yes.
Say no.</lang>
 
:So it addssubtracts 1 tofrom the counter before performing the comparison. This often works out nicely but it can make some things awkward. One could just as easily make a version that performs the comparison first and then adds one to the counter on the way out, or avoid using a routine like this altogether.
 
:When reading a routine like this, it's important to keep in mind that all values are passed by reference (by default) in Plain English. --[[User:Chunes|Chunes]] ([[User talk:Chunes|talk]]) 13:57, 10 December 2020 (UTC)
1,808

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.