Shop OBEX P1 Docs P2 Docs Learn Events
Keep looping line of code? — Parallax Forums

Keep looping line of code?

hmillerhmiller Posts: 17
edited 2011-08-15 22:37 in BASIC Stamp
Does anyone know how to keep looping a line of code when there is other code below or above it but that code needs to be activated by a push button, I know this is probably an easy fix.

I have a display that I want to keep scrolling text until the push button is press to activate the other code and after its proccess is done I would like the display to start scrolling again and keep doing it until the button is pushed again.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2011-08-15 22:37
    This is the sort of loop structure you'd need. It always scrolls at least one line.
    do
       do
          scroll text
       loop until pushbutton pressed
       other code
    loop
    
Sign In or Register to comment.