Hi all, I'm currently working on Plc4C. Here I need to save the datatype along with the plcvalue as there is no such thing as a "instanceof" in C. While initially this was fixed to a pre-defined list of built-in types, I'm currently making this more dynamic.
This got me thinking: Wouldn't this generally make sense in other languages too? For example, in KNX there are multiple datatypes which result in the same type of PLCValue. However, one is a Power-Consumption in Watt, another is a Temperature in °C. When parsing this generally isn't an issue, however when serializing the representation might vary (One might be that crazy KNX 16-bit float, another might be a real IEC Float). So we need to keep the datatype in parallel with the PLcValue. I think having it IN the plcvalue would be better. What do you think? Chris
