;Why does a negative number return 8 bytes
LongValue.l=2147483647
Debug "As a long " + Str(LongValue) + " .. as hex " + Hex(LongValue)
Debug ""
LongValue=-2147483647
Debug "As a long " + Str(LongValue) + " .. as hex " + Hex(LongValue)
Debug "Shoud return FFFFFFFF .. right?"
Why does this now return a different Hex() string than it did in PB Version 4.2? I can allow for this in that if the number is negative I can just discard the first 4 bytes, but will this behavior remain, or is it something that needs fixing?
TIA, and thanks to the team for all of their efforts on 4.3.
freak wrote:Use #PB_Long as the second parameter to Hex() to treat it as a long value (returning FFFFFFFF in this case)
Oh, this information is another Christmas present.
In the (English and German) help for PB 4.30, it's not mentioned that Hex() can take a second parameter.
Thanks everyone. As mentioned the help didn't say anything about this so I was clueless. #PB_Long does the trick. And, you're right it should have returned 8000001, had a brain fart there. Never was too great at base conversion
BTW I've found a few oversights in the help, like a some of the new libraries help points to an example but there doesn't seem to be an example available. I know that help authoring is a huge undertaking, so I'm very grateful for the help given.
Thanks to all for your help, got this one ported to PB 4.3 and works great. On to the next