Forum Discussion
EnTerr
11 years agoRoku Guru
"TheEndless" wrote:
As I mentioned earlier in this thread, there's at least one roXXXXEvent type that implements ifInt.
If by any chance you ever recollect (or re-encounter) which one, pls let me know - i am most interested to explore it
I have some serialization methods that don't trust "duck typing" for obvious reasons. I also have some casting/conversion functions that need to know the real type.
Huh. That's actually very un-obvious to me. Can you give me some examples, practical things that caused your mistrust?
Maybe you were afraid that checking with getInterface() coerces between Boolean, Int, Float and Double?! It doesn't, here is a cross-product test:
vals = [false, 0, 0.0, 0d]
ifcs = ["ifBoolean", "ifInt", "ifFloat", "ifDouble"]
for each val in vals: for each ifc in ifcs: ? type(val,3), ifc, getInterface(val, ifc): next: next