C isn't my first language, but I've written a good bit of it. I am examining a code and I have come across a construct I have never see before:
loop(i,nlevels)
{
/* do stuff based on "i" */
}
There is no do
, for
, or while
. "i" is not acted on inside the loop. I assume this means loop over "i" sequentially from 0 to nlevels (or maybe nlevels-1), but I don't know. I can't find this in K&R. I can't find it on the internet. Can someone enlighten me? Thanks.
loop
is most certainly a macro someone defined as it's not part of the C language.
Search for a #define loop
.
This macro is probably defined somewhere:
#define loop(index, steps) for(int index = 0; index <= steps; index++)
Or one that is looking very similar to it
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With