NYCPHP Meetup

NYPHP.org

[nycphp-talk] loop

Raymond DeRoo rderoo at abacusg.com
Thu Dec 19 17:02:34 EST 2002


Brain--

> for (;;) {
> [camera instuctions]
> }
>
> Anyone know the principal behind this snippet and why it works?  I have not
> been able to find any information on the subject.

It's a Cism near as I can tell. As you know it's the functional equivalent of 
while(1) {}. As for the principle behind it... the entire (;;) evaluates to 
an unmet condition. thus the for loop never ends. Personally I prefer (for 
readability purpose) the while(1). But most compilers today will optimize 
both such that the condition is never met.

.r



More information about the talk mailing list