Jump to content

Using "else" in an "if" statement.


---
 Share

Recommended Posts

I want to make this code recognize "YES", "Yes" or "yes".

//04.01.25 RS
Run=inquireText("Is the Block Fixture moved out of the way?"+cr()+"You can move the fixture now."+cr()+"User must answer YES to continue."+cr()+"CMM will stop if not YES.")
if Run == "YES"
else 
cncBreak()
endif
//End edit 

I am not structuring something properly and I can't wait to see how simple it is so I can laugh at myself.

Link to comment
Share on other sites

But you can use case conversion if you are trying to convert.

Run = inquireText("Is the Block Fixture moved out of the way?" + cr() + "You can move the fixture now." + cr() + "User must answer YES to continue." + cr() + "CMM will stop if not YES.")

if text(Run).asUppercase == "YES"
  // continue
else
  cncBreak()
endif

 

  • Like! 2
Link to comment
Share on other sites

 Share

×
×
  • Create New...