Shop OBEX P1 Docs P2 Docs Learn Events
SX/B: Using a variable as a the upper bound of a FOR loop — Parallax Forums

SX/B: Using a variable as a the upper bound of a FOR loop

geekythinggeekything Posts: 53
edited 2006-08-21 11:15 in General Discussion
Is it safe?

For example:
FOR Y = 1 to X
   ...
NEXT



Thanks,

-marc

Comments

  • BeanBean Posts: 8,129
    edited 2006-08-21 11:15
    Sure, no problem.

    What you cannot do is:

    FOR Y = 1 TO Y
     
    NEXT
    


    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheap 4-digit LED display with driver IC·www.hc4led.com

    Low power SD Data Logger www.sddatalogger.com

    "You're braver than you believe, stronger than you seem, and smarter than you think" Christopher Robin to Pooh
    ·
Sign In or Register to comment.