Pretty much. Both you and bogus apparently forget to put an initial value into var (unless your language of choice automatically initializes them as 0).
Mine does, but I’m aware that it’s good coding practice to specify anyway. I was maintaining his choice.
Using while(1) with a conditional return is a little bizarre, when you can just go while(var<100).
Yep, but I don’t remember how else to signify an intrinsically infinite loop, and bogus’ code seems to use an explicit return (which I wanted to keep for accuracy’s sake) rather than checking the variable as part of the loop.
My method of choice would be for(var=0; var<100; ++var){} (using LSL format), which skips both explicitly returning and explicitly incrementing the variable.
Mine does, but I’m aware that it’s good coding practice to specify anyway. I was maintaining his choice.
Yep, but I don’t remember how else to signify an intrinsically infinite loop, and bogus’ code seems to use an explicit return (which I wanted to keep for accuracy’s sake) rather than checking the variable as part of the loop.
My method of choice would be for(var=0; var<100; ++var){} (using LSL format), which skips both explicitly returning and explicitly incrementing the variable.