Help with Loops and IFs??

tuxduino:

I meant to write just the name of the tag (StarterCheck) without GoSub before it.

A label is not a sub(routine). GoSub is basic dialect for "call a subroutine". Goto is not the same as gosub.

Did you read http://arduino.cc/en/Tutorial/HomePage Section 1. Basics ? You seem to miss some fundamental bits.

I understand the difference between a GoSub and a Goto. A Goto does just what it implies, it goes to a certain part of the program and continues on to the rest of the code from there whereas a GoSub goes to a subroutine and returns to the following line from where it was called.

In pBasic to accomplish what I have in my flowchart I would write the following:

StarterCheck:
If StarterIn = LOW THEN StarterCheck

StarterCheck: is a placemarker, tag, or label (whatever you want to call it).
The "IF" statement would check to see if variable StarterIn is LOW then it will force the program to return to the tag/label "StarterCheck:". This keeps the program looping from "StarterCheck:" to the IF statement as long as variable StarterIn is LOW. Once it goes HIGH, the IF statement is no longer true and so the program falls through to whatever line of code is after the IF statement.

note: In my original post my IF statement was written incorrectly (used HIGH, instead of LOW), the correction has been made above.

So I guess my real question is, how do I create a tag, label, or placemarker in C for the program to go to when an IF condition has been met?