Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Conversion.

25 views
Skip to first unread message

Unknown

unread,
Nov 27, 2012, 10:34:56 AM11/27/12
to
Hello!

How can a signed 64 bits QUAD integer in PB be converted to a unsigned 64
bit integer?
Thanks!
--

Auric__

unread,
Nov 27, 2012, 2:40:39 PM11/27/12
to
Unknown wrote:

> How can a signed 64 bits QUAD integer in PB be converted to a unsigned 64
> bit integer?

PowerBASIC doesn't have an unsigned 64-bit data type. You can fake it using
EXT variables:

f80## = CEXT(i64&&)

...but note that due to how QUADs are implemented, and the limitations of
floating-point types, very large values lose precision. (Read the help file's
QUAD and EXT entries.) If that's not acceptable, you'll need to roll your own
data type. Google for something like "implement unsigned 64-bit integer
basic".

If you absolutely *must* have an unsigned 64-bit integer, and don't want to
roll your own, you'll need to use a different language. (For example,
FreeBASIC has ULONGINT, and QB64 (apparently) has _UNSIGNED _INTEGER64.)

--
It takes 24 hours to recover from a fake illness.
Message has been deleted
0 new messages