![](https://secure.gravatar.com/avatar/8a1ca9f288a1644e9e07d7f11d2f494c.jpg?s=120&d=mm&r=g)
Kassen,
I've often seen this type of thing...
0 => int i;
for(0 => i; i < 10; i++ )
{
// stuff
}
for(0 => i; i < 10; i++ )
{
// more stuff
}
just keep reusing the same iterator integer, which I assumed you were
talking about earlier.
Also, this is going to be a lot more important for object references
and large arrays, etc. but it's neat trick that I didn't know about
before
_mike
2009/3/21 Kassen
Mike;
Όλα Καλά!!
I'll assume that translates to "w00t"? :¬D
Three cheers for Eduard!
This won't work on floats and ints though ( for strings it's fine). Arrays of length 1, on the other hand, can be dealt with in this way if we really urgently must clean up everything.
Sadly that will make for loops look like this;
for (int n[1]; n[0] <= 5; n[0]++) { <<
>>; if( n[0] == 5) {null @=> n; break;} } That's not going to win any beauty awards. Ahum.
Kas.
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users