02-22-2008 12:03 PM
02-23-2008 04:05 PM
02-23-2008 06:56 PM
@tst wrote:
The exact operation of a type cast might not be what you expect. You have to understand exactly how it works before you can use it correctly, so you should use the numeric conversion operations when possible. My first guess would be that you are trying to typecast a number which has a different representation (e.g. I32 to U16) and you're getting coercion to your maximum value.
02-23-2008 07:22 PM
02-24-2008 03:03 AM
earlevel wrote:
I see that U8 is shifted into the high-order byte of a conversion to U16. That's incredibly counter-intuitive. The integer conversions described imply that ints are assumed to be fixed point fractions, which is rarely the case. Also, it means you have to know the native size of the enumeration constant for the conversion to work.
02-24-2008 10:14 AM
01-10-2013 08:39 AM
Type cast doesn't seem to work in LV 2012.
You can do this by bundling and then unbundling.
Here's an example.
01-10-2013 09:44 AM
01-10-2013 09:48 AM
Yes!
Hence why I'm posting!
I found this thread while searching and found that the type casting didn't work, although this seems to document that it used to, so i thought it could do with an update. My colleague has also posted a nice, neater solution in reply to the example I referenced so it turns out there are a few ways to do this.
01-10-2013 10:06 AM
At this point of time I recollect my suggestion