Open main menu
Home
Random
Log in
Settings
About Conservapedia
Disclaimers
Conservapedia
Search
Changes
← Older edit
Newer edit →
Loop
(view source)
Revision as of 17:33, December 2, 2008
7 bytes added
,
17:33, December 2, 2008
m
indent code blocks more
Line 6:
Line 6:
This trivial example prints out the first five integers:
This trivial example prints out the first five integers:
FOR I = 1 TO 5
FOR I = 1 TO 5
−
PRINT I
+
PRINT I
NEXT I
NEXT I
Line 13:
Line 13:
for (int i = 0; i < 5; i++) {
for (int i = 0; i < 5; i++) {
−
System.out.println( employee(i) );
+
System.out.println( employee(i) );
}
}
Line 21:
Line 21:
while ( boxes.getCount() > 0 ) {
while ( boxes.getCount() > 0 ) {
−
Item box = boxes.getFirst();
+
Item box = boxes.getFirst();
−
box.shipToCustomer();
+
box.shipToCustomer();
−
boxes.remove(box);
+
boxes.remove(box);
}
}
Line 32:
Line 32:
do {
do {
−
queue.printStatus();
+
queue.printStatus();
−
queue.processFirstItem();
+
queue.processFirstItem();
} while (queue.hasItems());
} while (queue.hasItems());
[[Category:Computer Programming]]
[[Category:Computer Programming]]
Ed Poor
Siteadmin,
Check users
, nsTeam1RO, nsTeam1RW, nsTeam1_talkRO, nsTeam1_talkRW, oversight,
Administrators
30,650
edits