BS1 Code
Blackbird455
Posts: 124
Is there a more efficient way to write this:
· SYMBOL· reps··· = W1··················· ' FOR...NEXT loop counter
Main:
FOR reps = 0 TO 65535 STEP 3000······ ' each loop add 3000
HIGH 2
PAUSE 20
LOW 2
PAUSE 20
HIGH 2
PAUSE 20
LOW 2
PAUSE 20
HIGH 2
PAUSE 20
LOW 2
PAUSE 20
HIGH 2
PAUSE 20
LOW 2
PAUSE 20
HIGH 2
PAUSE 20
LOW 2
PAUSE 20
HIGH 2
PAUSE 20
LOW 2
PAUSE 20
HIGH 2
PAUSE 20
LOW 2
PAUSE 20
HIGH 2
PAUSE 20
LOW 2
PAUSE 100
HIGH 1
PAUSE 50
LOW 1
PAUSE 20
HIGH 1
PAUSE 50
LOW 1
PAUSE 20
HIGH 1
PAUSE 50
LOW 1
PAUSE 20
HIGH 1
PAUSE 50
LOW 1
PAUSE 200
NEXT
· SYMBOL· reps··· = W1··················· ' FOR...NEXT loop counter
Main:
FOR reps = 0 TO 65535 STEP 3000······ ' each loop add 3000
HIGH 2
PAUSE 20
LOW 2
PAUSE 20
HIGH 2
PAUSE 20
LOW 2
PAUSE 20
HIGH 2
PAUSE 20
LOW 2
PAUSE 20
HIGH 2
PAUSE 20
LOW 2
PAUSE 20
HIGH 2
PAUSE 20
LOW 2
PAUSE 20
HIGH 2
PAUSE 20
LOW 2
PAUSE 20
HIGH 2
PAUSE 20
LOW 2
PAUSE 20
HIGH 2
PAUSE 20
LOW 2
PAUSE 100
HIGH 1
PAUSE 50
LOW 1
PAUSE 20
HIGH 1
PAUSE 50
LOW 1
PAUSE 20
HIGH 1
PAUSE 50
LOW 1
PAUSE 20
HIGH 1
PAUSE 50
LOW 1
PAUSE 200
NEXT
Comments
· When I tokenize,· "undefined variable" for the "i" :
· FOR i = 1 TO 16
Is this just another Noob mistake on my behalf?
SYMBOL i = W1 '(Or what ever variable size you need, I don't program in basic 1 so I don't know)