hexagon logo

Yes No Input comments

Is it possible to use a YES/NO comment to branch around a portion of a program? I don't want to have to do any gymnastics to get this done. I have a program that runs sub assemblies and one of these subs sometimes has a bracket on it that I want to skip the measurements on IF it isn't there.

I'm thinking something like

IF C1.INPUT = "NO" then goto XXXXX

I keep getting an "invalid number entered" error.

Thanks,

Bill
Parents
  • I got it thanks. It was simple syntax on my part.

    IF/C1.INPUT=="YES" <----<<< proper syntax

    END/IF <----<<< put this where you want the program to pick up and start running again.

    If C1 = "NO" then it continues to run as if the conditional statement wasn't there.

    Matt, I wanted to see if I could use YES/NO and it works quite well. I don't want people to have to think about these programs. I want them to be so easy that anyones monkey can run it without having to slow down and think lets see 1 = yes so that means I need a no and thats a 2.. etc...


    Bill
Reply
  • I got it thanks. It was simple syntax on my part.

    IF/C1.INPUT=="YES" <----<<< proper syntax

    END/IF <----<<< put this where you want the program to pick up and start running again.

    If C1 = "NO" then it continues to run as if the conditional statement wasn't there.

    Matt, I wanted to see if I could use YES/NO and it works quite well. I don't want people to have to think about these programs. I want them to be so easy that anyones monkey can run it without having to slow down and think lets see 1 = yes so that means I need a no and thats a 2.. etc...


    Bill
Children
No Data