A
/ \ _ Play Now Nemesis on
| | | | _______ _ _ _______ _______ _ _______
| |\ | | | ____| | \ / | | ____| / ____| | | / ____|
/-------/-------------------------------------------------------------------,
O= Home <=XX| About News Pics Adventurers Wizards Download Connect >
\-------\-------------------------------------------------------------------'
| | \ | | |____ | | | | | |____ ___ \ \ | | ___ \ \
| | \_| |_______| |_| |_| |_______| |_______/ |_| |_______/
\ /
V
Documentation Area
Document Path: /doc/LPC/foreach
FOREACH STATEMENT
foreach(counter, array) statement;
foreach is a systemwide macro that will efficiently step an
integer counter from the last element of an array down to 0.
Example:
int i; object* a = sorted_users();
foreach(i, a) printf("%O\n", a[i]);
The effect of this example is a list of all user objects logged in.
This is a simulated LPC extension done via /include/auto.h .
See also:
This page was generated in LPC
Imprint / Impressum