I wish we had a do ... repeat statement!!!

Dave dave at looktowindward.com
Wed Apr 18 11:28:31 EDT 2007


Hi,

> You could also just initialize x to something greater than zero...

Yes, I have to pre-initialize x (or whatever), that's the problem. I  
end up having to initialize the variable (or whatever) initially and  
then again inside the loop. In the this case it's trivial, but when  
the condition is more complex and when there are a lot of nested  
repeats it gets really messy.

All the Best
Dave

On 18 Apr 2007, at 11:36, Mark Smith wrote:

> You could also just initialize x to something greater than zero...
>
> Best,
>
> Mark
>
> On 18 Apr 2007, at 11:02, Dave wrote:
>
>> Hi,
>>
>> I've just finished coding one of the most complicated multiple  
>> loops I've ever had to do! I must say that the amount of code that  
>> I had to write could have been cut down quite a lot if RunRev had  
>> a do <this> repeat while statement.
>>
>> In C the syntax is:
>>
>> while (x > 0)
>>    {
>>    do these statements
>>    }
>>
>> Which in RunRev is roughly equivalent to:
>>
>> repeat while x > 0
>>    do these statements
>> end repeat
>>
>> But C also has this structure:
>>
>> do
>>    {
>>    do these statements
>>    }
>> while (x > 0)
>>
>> which AFAIK doesn't have a RunRev equivalent.
>>
>> Would be so nice to have something like:
>>
>>
>> dorepeat
>>
>>    do these statements
>>
>> dorepeat while x > 0
>>
>> So whatever syntax works better!
>>
>> All the Best
>> Dave
>>
>>
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your  
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list