Shop OBEX P1 Docs P2 Docs Learn Events
Multi Slot Programming Help. — Parallax Forums

Multi Slot Programming Help.

GuidoGuido Posts: 195
edited 2007-04-17 00:30 in BASIC Stamp
I have a problem when running in slot 1, I need to get back to a certain point in slot 0....

Example: RdTemp in Slot 0 and I do not want to start at Main in Slot 0

Does this make sense.

Tried doing this but it won't work: Run 0 RdTemp
Thank You
Guido

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-04-17 00:30
    The only way to get back to a particular point in slot 0 is to set a shared variable to a particular value, then test for that value at the beginning of the program in slot 0 and GOTO that point if the value is what is needed.

    There is no way to do this with the RUN statement.

    In other words, you MUST start with Main in Slot 0, but the first thing that Main can do is to GOTO RdTemp if a global variable is set to a particular value which is non-zero and set by the program in Slot 1.
Sign In or Register to comment.