Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
For loops with type byte (*solved*)
#1
Code:
dim c,b as byte


FOR c=1 TO 175
FOR b=1 TO 250
  PLOT b,c
NEXT b
NEXT c

Doesn't seem to work as expected. If I make it a uinteger, it works perfectly. At first I thought it was a problem with 0=256 in a byte the original was
Code:
FOR c=0 TO 175
FOR b=0 TO 255

Which I could see not terminating, since a byte can never get bigger than 255.

However the problem I have with it as written is it's skipping the loop altogether..

1> Would for/next loops with byte be faster? (I'm following the principle of smaller=faster)

2> Why isn't it running the loop?


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)