18F46K22 ULONG

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
saschech@gmx.de
Posts: 714
Joined: Wed Jan 31, 2007 12:41 pm
Has thanked: 1 time
Been thanked: 26 times
Contact:

18F46K22 ULONG

Post by saschech@gmx.de »

Hello

I have trouble with the ULONG variable.
I expect 42949697295 >> I show 24335??

Please help

Regards Wolfgang
Attachments
ULONG.gif
ULONG.gif (41.41 KiB) Viewed 2979 times

User avatar
JonnyW
Posts: 1230
Joined: Fri Oct 29, 2010 9:13 am
Location: Matrix Multimedia Ltd
Has thanked: 63 times
Been thanked: 290 times
Contact:

Re: 18F46K22 ULONG

Post by JonnyW »

Hi Wolfgang.

The problem is that a ULONG is a 32-bit number. 42949697295 is hex A00005F0F - in 32 bits this is 00005F0F (the 'A' is lost in integer overflow).

For the hex number A0005F0F use the decimal 2684378895.

Cheers,

Jonny

saschech@gmx.de
Posts: 714
Joined: Wed Jan 31, 2007 12:41 pm
Has thanked: 1 time
Been thanked: 26 times
Contact:

Re: 18F46K22 ULONG

Post by saschech@gmx.de »

Hello Jonny

I think the information in the build-window are not right.
If I put in your new number show......

Regards Wolfgang
Attachments
ULONG new.gif
(49.26 KiB) Downloaded 658 times
value.gif
(63.72 KiB) Downloaded 658 times

User avatar
JonnyW
Posts: 1230
Joined: Fri Oct 29, 2010 9:13 am
Location: Matrix Multimedia Ltd
Has thanked: 63 times
Been thanked: 290 times
Contact:

Re: 18F46K22 ULONG

Post by JonnyW »

Hi Wolfgang. Yes, there is an issue where unsigned values are shown as signed in the watch window. The value is correct, it is just the signed equivalent. The hex value is always unsigned.

Cheers,

Jonny

Post Reply