How does the vex brain handle running multiple while loops at once? I started in block code, and am now in the process of learning and transitioning over to coding in python. I know both relatively well now.
When I’m block coding, my code has three hat blocks (or three functions). When autonomous, when driver control, and when started. The last two both have a forever loop under them, and when I run the code (which I’ve done countless times over the season), has run perfectly. When I then translate it over to python text coding, it shows what I expect. The same functions, with a while True:
statement.
My problem is when I go into another application to run unrelated python code. I used the same strategy, of creating multiple functions, and putting a while
statement inside of them, except mine doesn’t work. It runs the first while statement, and then when it finishes, it runs the other.
How does vex do this, and why can’t I?