Go Down

Topic: for loop is wierd? [solved] (Read 804 times) previous topic - next topic

AWOL

It depends whether or not the intention is to re-use the value later, perhaps after a loop break.
Or maybe you want to port your code to C.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

BareMetal

Sorry for the overkill, peeps, I was shooting from the hip :)
See more 'duino / lego / robotics / electronic stuff on my blog http://philipbowles.com/blog

tack

#17
Dec 28, 2013, 12:04 am Last Edit: Dec 28, 2013, 12:12 am by tack Reason: 1

Sorry for the overkill, peeps, I was shooting from the hip :)

Apology is mine. You were right, although unsigned long would be more appropriate. I only looked at the data posted and a rollover at 1420 loops, but he must have had another rollover earlier already as the total should have been about 96000 odd.

My train of thought was unsigned int due to that and only seeming like 80 more loops required.

:smiley-red:

BareMetal

No apology required. Uint would have been better learning...we are all here to help each other out, and/ or amuse! Nice to meet u. The guy got sorted, thats what matters.
See more 'duino / lego / robotics / electronic stuff on my blog http://philipbowles.com/blog

malawi

Thanks for all the replies,
I got the program working and  you guys learned me alot.
much apreciated:)

Malawi

UKHeliBob

[pendant]
Quote
you guys learned me alot
I hope that you were taught something too
[/pedant]
Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

PaulS


[pendant]
Quote
you guys learned me alot
I hope that you were taught something too
[/pedant]

Your opening and closing tags don't match.  8)

AWOL

Yeah, you've got a dangling "pendant"
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

UKHeliBob

You two are just being ultra pe(n)dantic, but are right, of course.
Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

Go Up