kolonelvonklink
May 31st, 2007, 04:56 AM
Hi As I'm programming microcontrollers (atmel avr) with the Bascom compiler, I've encounters the next issue:
Dim x as byte
For x = 0 to 20
print x
next
print x
end
as result I get the printing of "0" to "21"
seems confusing/unlogical to me since I asked to go to 20 and not to 21
Is this also case in other basics?
Dim x as byte
For x = 0 to 20
print x
next
print x
end
as result I get the printing of "0" to "21"
seems confusing/unlogical to me since I asked to go to 20 and not to 21
Is this also case in other basics?