02-15-2010 03:08 PM
I understand what pointer-sized integers are (and I was plesently surprised that they have been added to LabVIEW), but what's the difference between a signed pointer-sized integer, and an unsigned pointer-sized integer. they seem to do the same thing, so I thought maybe it just allows one to wire the different LabVIEW datatype to the input without a coercion dot. I can't seem to find anything about the difference.
~Benjamin
02-15-2010 04:05 PM - edited 02-15-2010 04:06 PM
BenjaminS wrote:I understand what pointer-sized integers are (and I was plesently surprised that they have been added to LabVIEW), but what's the difference between a signed pointer-sized integer, and an unsigned pointer-sized integer. they seem to do the same thing, so I thought maybe it just allows one to wire the different LabVIEW datatype to the input without a coercion dot. I can't seem to find anything about the difference.
~Benjamin
I'm not really sure but there is most likely no technical difference. On the LabVIEW diagram this is simply a signed or unsigned 64 bit integer. But whenever this 64 bit integer is passed to a Call Library Node parameter that is configured to be pointer sized LabVIEW will copy the lower significant 32 bit part to the stack when it is running as 32 bit version and te entire 64 bit value when it is running as 64 bit (and of course the according reverse operation when you have wired the output side on the right side).
02-16-2010 11:43 AM
02-16-2010 01:48 PM
Of course Ben, but for a pointer that has little significance. The pointer-integer is passed to the function as is.
I would simply make sure that a particular pointer is always the same signedness just to be on the safe side, but LabVIEW does for integers of the same size really a cast anyways, just as C compilers normally do.
I guess you could say that the CPU treats pointers always as unsigned but that is also just an academic exercise really. It is how we like to look at the pointers and that is usually in Hex notation which by its nature is normally unsigned. For the CPU it is just a bunch of 1 and 0 anyhow.