04-14-2014 03:47 AM
Programmatically it's possible to set VAL_SIZE_T, VAL_SSIZE_T, ..., VAL_INTPTR_T, VAL_UINTPTR_T...
Solved! Go to Solution.
04-15-2014 05:20 AM
Hello Wolfgang,
in which context you want to use size_t or ssize_t?
04-15-2014 05:23 AM
when writing code that should work both in 32 bit and 64 bit, as recommended by NI
04-15-2014 05:33 AM
Please give me an example.
04-15-2014 09:46 AM
I am not sure what kind of example you expect...
I have an integer variable representing the number of recorded events of a measurement; in the 32 bit version this is limited to 4*10^9 events which can be a restriction. So for computers running a 64 bit system I'd like to extend it to larger numbers; hence I replaced int by ssize_t and want to dispay this number in a table cell.
This is the same transformation that was applied to most CVI library routines in 2010, e.g. PlotXY now expects ssize_t for the number of points to plot.
This issue has been already discussed March 2010 with respect to numeric controls here, but it seems that nothing has changed for the better the last four years - the UI editor is still useless in such cases
04-16-2014 12:23 PM
Hi Wolfgang,
The UI editor uses intptr_t and unsigned intptr_t for that purpose. Those types are functionally identical to size_t and ssize_t and so there is no need for all four of them to be in the editor.
Luis
04-16-2014 12:54 PM
Thanks Luis for the extra serivce
Unfortunately this is not mentioned anywhere (I was searching the help)..., and interestingly it is possible to set the type to size_t or to intptr_t programmatically... so I would say I either missed some documentation or systematics
I also had a look into the include file and had the impression that both definitions should be equivalent, but since I encountered a problem (here) I wasn't so sure... So now my conclusion is that the issue reported seems to be a bug...
Thanks (and happy holidays)
04-16-2014 05:13 PM
That's a valid point. We'll address that in the help (465997).
Happy holidays to you as well.
Luis