Shop OBEX P1 Docs P2 Docs Learn Events
very simple very stupid — Parallax Forums

very simple very stupid

ellizardellizard Posts: 106
edited 2005-05-25 15:50 in BASIC Stamp
Hi everybody.

can some of you explain why i'm not able to perform this very simple task?

DO
·Ore=1
DEBUG BIN16 Ore, CR
PAUSE 1000
Ore = (Ore+1)
LOOP
END
the debug windows give me always the same 0000000000000001 without incrementing the variable Ore???


thanks in advance for the help you will give me, i cannot come out of this very silly corner


Stefano

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-05-25 15:45
    Hello,

    ·· That is because in each pass through the loop you're resetting the variable Ore back to 1.· You should place the Ore = 1 before the DO section.






    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • ellizardellizard Posts: 106
    edited 2005-05-25 15:50
    I knew i was doing something stupid

    thanks again
Sign In or Register to comment.