Unit101 Posted April 17, 2021 Posted April 17, 2021 Here is interesting question from end user: For Example I would like to do something like what is below If (MyVar == Pvaraible) { stuff } // checking if MyVar is a P variable if (MyVar == Mvarialbe) {different stuff} //Checking if MyVar is a M Variable Thanks! *** Ideas on how to determine in logic a given variable is type M,Q,P ? - perhaps in CfromScript sub-routine to do a query and read back the echo text to see the letter M or P ? - In var Name append a letter at end _M _P then have a sub-routine return if text matches M or P ? Thanks for looking...
Omron Forums Support Posted May 20, 2021 Posted May 20, 2021 I'm not sure I understand the point of the question. Why would you need to check at runtime what type a variable is? Almost every check I can come up with has to be done in C and won't build if the test would fail.
Recommended Posts