Why is SYSTEM.TYPE_CLASS.TYPE_ANYINT never reached? If I pass it a LINT?
And if it's not possible you use SYSTEM.TYPE_CLASS.TYPE_ANYINT for comparison this what is the point?
VAR_INPUTValue:ANY;END_VAR//BodyCASEValue.TypeClassOF__SYSTEM.TYPE_CLASS.TYPE_ANYINT:LogWrapper(LogClass.LOG_INFO,'Value is an int type');//thisisneverreached__SYSTEM.TYPE_CLASS.TYPE_ANYREAL:LogWrapper(LogClass.LOG_INFO,'Value is a real type');//thisisneverreached__SYSTEM.TYPE_CLASS.TYPE_BOOL:LogWrapper(LogClass.LOG_INFO,'Value is a bool');__SYSTEM.TYPE_CLASS.TYPE_LINT:LogWrapper(LogClass.LOG_WARNING,'Type LINT, is this should never be reached');//Thisisreachedbutshouldnotbe__SYSTEM.TYPE_CLASS.TYPE_LREAL:LogWrapper(LogClass.LOG_WARNING,'Type LREAL, is this should never be reached');//ThisisreachedbutshouldnotbeEND_CASE
Last edit: thecolonel26 2023-05-02
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Why is SYSTEM.TYPE_CLASS.TYPE_ANYINT never reached? If I pass it a LINT?
And if it's not possible you use SYSTEM.TYPE_CLASS.TYPE_ANYINT for comparison this what is the point?
Last edit: thecolonel26 2023-05-02
TYPE_ANYINT is the generic data type used for declarations.
TypeClass only returns the elementary data type.
See the table in Data Type: ANY