Code: Select all
Loop 10
AddElement(LinkedList())
EndLoop
Code: Select all
Loop 10
AddElement(LinkedList())
EndLoop
Code: Select all
for n = 1 to 10
addelement(...)
next n
Code: Select all
Repeat
AddElement(LinkedList())
Until CountList(LinkedList()) = 10
I don't know how many elements which is currently in the list, but I found another way to do it without using an extra variable.Dare2 wrote:Code: Select all
Repeat AddElement(LinkedList()) Until CountList(LinkedList()) = 10
Sorry (not really), just being hair-splitty.
I like/support the Loop n .. EndLoop idea. Maybe version 4.01:)
Code: Select all
Repeat
AddElement(LinkedList())
Counter+1
Until Counter=10
It would be easy to use a register for this, thus giving a speed boost. Also, if you don't care about the way you type it, you might as well program only in assembly.kenmo wrote:But... for the program to keep track of how many times its looped, there's gonna be an internal variable anyway... so the only difference would be the way you type it. (ie zero benefit in the end)
Code: Select all
Repeat
AddElement(Memory())
Until CountList(Neurons()) = CountList(Memory())
Code: Select all
Loop CountList(Neurons()) - CountList(Memory())
AddElement(Memory())
EndLoop
Code: Select all
Loop 10
AddElement(LinkedList())
EndLoop