I feel like I should know this, but having been out of the CW game for a decade and still using C6 I’m more than a little behind the curve
What’s this decades workaround for being able to handle 64 bit values as pointers being received from external sources? Is it still a group with 2 LONGs in it? Or did someone figure out something better when I wasn’t paying attention?
And on a tangent, I assume that we’re still waiting on SV to implement native 64 bit support?
While there are 44 exported procedures in the 11.13505 RTL that start with Cla$i64
I’m not aware of a way to declare 64 bit variables yet.
The clarionhelp.chm mentions INT64 and UINT64 as coming in a future release
So yup, use a group.
FWIW %cwroot%\libsrc\win\svapi.inc has _ULARGE_INTEGER
however the group seems more appropriate for a LARGE not a ULARGE
as both HiPart and LowPart are LONG
here’s something I wrote for Diego during a CIDC presentation 3 years ago.
Looks like I did the same thing with Hi not being a ULONG
Thanks Mark, suspected as much.
Looking at svapi.inc shows a bunch of code dealing with COM objects that could potentially be helpful in the future, but as usual there’s no doc to go with it
I’ve not heard of any native 64 types to ship with C12, but hey, who knows…
On the bug Mark points out, “the group seems more appropriate for a LARGE not a ULARGE
as both HiPart and LowPart are LONG” he is correct. I would not use these to do 64 bit math. For “data storage” though it works fine, since it’s just 8 bytes of ram. Get one API to set it, pass it to another API and you’ll be ok. (Frankly a String(8) would work for this as well.)
64 bit math is a different topic - for large integers (ie > 4 billion) I’ve just switched to using Reals. So not quite as big as an int64, but 15 significant digits, so big enough for what I need.