repeat - until
while - do - end
if - then - end
for - do - end
or does it matter
i know that sometimes you may have only one choice for the situation but if you were able to any to get the required result is one better then the other [import]uid: 7911 topic_id: 14550 reply_id: 314550[/import]
yeah a know if then not a loop but
I have a function that I need to loop an unknown amount of time and was wondering if it made a difference on memory usage
I could say if condition not true then rerun function or
repeat until condition not true or
while condition true do or
for 1, condition do
in other words I could make any of them do what I need but memory wise which is better
[import]uid: 7911 topic_id: 14550 reply_id: 53925[/import]
you have an unknown amount, so the only options you have are
do…while
repeat…until
the only thing you need to now know is if there is a scenario where you do not wish this to run at all, if that is the case then you will use do … while, but if you want this to run atleast *once* then you will use repeat … until