|
![]() |
Overclock.net - Overclocking.net > Software, Programming and Coding > Coding and Programming > Application Programming | |
How do you call repeat/recursive in C#?
|
||
![]() |
|
|
LinkBack | Thread Tools |
|
|
#11 (permalink) | ||||||||||||||
|
Programmer
|
Quote:
for(executed before; conditional statement; run after each iteration) so something like: Code:
for(int i = 0; i < 10; i++){
cout << i << endl;
}
The for loop is not actually a function like it looks. Its (I believe) a macro that gets turned into a while loop behind the scenes. Ironically, you can actually do: Code:
for(;;){
}
Edit: Bah, to slow on the stick. Nice job Polska.
__________________
Whats this folding I've been hearing about? Crucial Ballistix Club ![]() Member of the OCN Diablo III Club ~M Hail to the Victors M~
|
||||||||||||||
|
|
|
|
#12 (permalink) | ||||||||||||||
|
Miscelaneous
|
Quote:
Code:
for(any statement;expression determining when to break without being called;any statement)
__________________
|
||||||||||||||
|
|
|
|
#13 (permalink) | |||||||||||||
|
Programmer
|
Correct. Thought the first "any statement" will only be run before the loop starts, and the second will be run after each iteration.
__________________
Whats this folding I've been hearing about? Crucial Ballistix Club ![]() Member of the OCN Diablo III Club ~M Hail to the Victors M~
|
|||||||||||||
|
|
|
|
#14 (permalink) | ||||||||||||||
|
Miscelaneous
|
Quote:
Code:
for(run at start; continue if true; run every cycle) And Code:
<variable>++ Code:
<variable> += 1
__________________
Last edited by Licht : 12-16-07 at 09:15 PM. |
||||||||||||||
|
|
|
|
#15 (permalink) | |||||||||||||||
|
Programmer
Join Date: Oct 2007
Location: Toronto, Ontario, canada
Posts: 188
Rep: 16
![]() Unique Rep: 15
Trader Rating: 0
|
Here is a more formal definition from a book I have.
Quote:
__________________
Quote:
CPU-Z Validation
|
|||||||||||||||
|
|
|
|
|
#16 (permalink) | |||||||||||||
|
Miscelaneous
|
__________________
|
|||||||||||||
|
|
|
|
#17 (permalink) | |||||||||||||
|
Programmer
|
Nail on the head my friend.
__________________
Whats this folding I've been hearing about? Crucial Ballistix Club ![]() Member of the OCN Diablo III Club ~M Hail to the Victors M~
|
|||||||||||||
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|