L
Laura Stern
Guest
For better or worse, there are 2 sets of rules regarding data conversion. In the procedural and assignment world, the AVM is much looser about data type conversions. I would say almost anything is allowed that can be. So you can pass an INT to a CHAR and it will be converted as if you had used the STRING() function on the number. Similar conversions are done for assignments. You can even pass an INT64 to an INT as long as the value at run-time is not too big to fit. I don't know if this is documented anywhere. I thought it was in the old programming handbook, but that is long gone. However, in the OO world, we are much stricter about what is compatible with what. You can pass an INT to an INT64, or a CHAR to a LONGCHAR, but for each, not the other way around. The compiler enforces this, not the run-time. And you cannot pass an INT to a CHAR, etc. I thought this set of rules was documented in the OO book but honestly, I cannot find it right now.
Continue reading...
Continue reading...