I have a function with an input of ANY type. I have discovered that if an integer type has a subrange, for example:
Var1: INT(1..50);
then the TypeClass of the ANY variable becomes TYPE_SUBRANGE, instead of its base type. The problem is that it is not possible to determine what type the variable is. I can determine whether it's 8,16,32,or 64 bits using the diSize variable, but there's no way to tell if it's signed or unsigned.
Has anyone else run into this? Why would it be designed this way?
I have a function with an input of ANY type. I have discovered that if an integer type has a subrange, for example:
Var1: INT(1..50);
then the TypeClass of the ANY variable becomes TYPE_SUBRANGE, instead of its base type. The problem is that it is not possible to determine what type the variable is. I can determine whether it's 8,16,32,or 64 bits using the diSize variable, but there's no way to tell if it's signed or unsigned.
Has anyone else run into this? Why would it be designed this way?
Last edit: tvm 2022-02-23
It doesn't fix the ANY, but if you need that info you could use __VARINFO which gives you a bit more info.