The for statement you see here is the C-style for statement, so its translation to C should be fairly trivial (please note that I don't program C, I only know how to read it - I'm not sure with the pointer syntax, as on which side the asterisk goes when, and I don't know whether C '99 introduced the arrow syntax for dereferencing...):
int *L; /* Aaah, C, the language where an int is a pointer and a point +er is an int */ int *m; for (L = *tabs[10]; L; L = L*) { *m[ *L[1] ] = *L[2]; }; /* But I think this should be clearer : */ int *L; /* Aaah, C, the language where an int is a pointer and a point +er is an int */ int *m; for (L = *tabs[10]; L; L = L*) { int index = *L[1]; int value = *L[2]; *m[ index ] = value; };
perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The $d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider ($c = $d->accept())->get_request(); $c->send_response( new #in the HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web
In reply to Re: strange "for " statement
by Corion
in thread strange "for " statement
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |