Shop OBEX P1 Docs P2 Docs Learn Events
Can methods be toggled? — Parallax Forums

Can methods be toggled?

lardomlardom Posts: 1,659
edited 2010-02-23 18:12 in Propeller 1
Is it possible to toggle·method calls·with modulus? I would like to alternate between method "A" and method "B".eyes.gif

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-02-23 18:01
    The only way to do this is to use an IF statement with a Boolean variable like this:
    VAR long switch
    ....
    switch := false
    ....
    IFNOT switch
       A
    ELSE
       B
    NOT switch
    
  • lardomlardom Posts: 1,659
    edited 2010-02-23 18:12
    Thanks Mikecool.gif
Sign In or Register to comment.