Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C89 foreach macro

Name: Anonymous 2013-04-11 23:12

Anyone else ever write a foreach macro in C? I find it useful to have every now and again, but I find myself needing to rewrite the macro for every different large project. Maybe I'm not doing it right...

Name: Anonymous 2013-04-12 0:22

IN DA FIRST TWO CASES U MAY AS WELL JUST USE DA WIDELY ACCEPTED IDIOMS:

for (i = 0; i < sizeof a / sizeof a[0]; i++) { a[i] ... }
for (np = l; np; np = np->next) { np->data ... }

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List