[Ri...] Posted October 29, 2025 Share Posted October 29, 2025 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 https://qualityforum.zeiss.com/topic/24905-using-else-in-an-if-statement/ Share on other sites More sharing options...
[Ri...] Posted October 29, 2025 Share Posted October 29, 2025 Well if the answers are only Yes/No, I would just use confirm instead of inquireText. 1 Link to comment https://qualityforum.zeiss.com/topic/24905-using-else-in-an-if-statement/#findComment-141041 Share on other sites More sharing options...
[Ri...] Posted October 29, 2025 Share Posted October 29, 2025 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 2 Link to comment https://qualityforum.zeiss.com/topic/24905-using-else-in-an-if-statement/#findComment-141043 Share on other sites More sharing options...
[Ch...] Posted October 29, 2025 Share Posted October 29, 2025 (edited) There are also the following : .asLowercase and .asCapitalized and also : .startingWithUppercaseLetter Edited October 29, 2025 1 1 Link to comment https://qualityforum.zeiss.com/topic/24905-using-else-in-an-if-statement/#findComment-141045 Share on other sites More sharing options...
[Ri...] Posted October 29, 2025 Author Share Posted October 29, 2025 Please sign in to view this quote. Well, that simplified the process. Thank you. Link to comment https://qualityforum.zeiss.com/topic/24905-using-else-in-an-if-statement/#findComment-141047 Share on other sites More sharing options...
[Pi...] Posted November 19, 2025 Share Posted November 19, 2025 If I may ask - what is the difference in code between: .asUppercase ---> all letters are Upper case .asCapitalized ---> ????? this one I do not understand - Please explain if possible as for me it is same as the one below. .startingWithUppercaseLetter ---> First letter is Upper case 1 Link to comment https://qualityforum.zeiss.com/topic/24905-using-else-in-an-if-statement/#findComment-142267 Share on other sites More sharing options...
[Ma...] Posted November 19, 2025 Share Posted November 19, 2025 Capitalized should make first letter from word in upper case. Example: Hello there fellow comrades -> Hello There Fellow Comrades 1 Link to comment https://qualityforum.zeiss.com/topic/24905-using-else-in-an-if-statement/#findComment-142269 Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in