hexagon logo

Testing commend input for numbers

Hello, I'm rather new to using logical operations in PCDMIS, so please bear with me.

I have a dialog box pop up when starting my program to ask the operator what fixture number the part came from. This can be 1 - 48. I am passing this number through a Tracefield to Excel output to WinSPC. I cannot handle this Fixture_Number variable in anything else but a strict numerical input like "23" when WinSPC is processing this data. How can I test if this input is strictly a number between 1 & 48, with no other characters? I think I'd be ok if it was just a number test, but would be nice if it also caught numbers that are more than 2 digits. Any ideas?

Snippet:


Thanks
Parents
  • IF/ROUND(C2.INPUT)<>C2.INPUT comment (...)
    GOTO /C2
    END IF

    I'm not at the cmm, I thought GOTO needed a label...


    Oooo, I like that conditional statement. I thought there must have been a better way!

    Nope. The GOTO statement works with feature names too. At least, it has worked all the times I have tried it. Though, I admit, it might not be best practice.
Reply
  • IF/ROUND(C2.INPUT)<>C2.INPUT comment (...)
    GOTO /C2
    END IF

    I'm not at the cmm, I thought GOTO needed a label...


    Oooo, I like that conditional statement. I thought there must have been a better way!

    Nope. The GOTO statement works with feature names too. At least, it has worked all the times I have tried it. Though, I admit, it might not be best practice.
Children
No Data