Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » int64 formating
int64 formating [message #26998] Sat, 19 June 2010 22:39 Go to next message
Zbych is currently offline  Zbych
Messages: 325
Registered: July 2009
Senior Member
Hi,

Format doesn't work with 64-bit variables on 32-bit platform. All (u)int64 numbers are shown as (u)int32. For example:

PromptOK(Format("%ld 0x%lX",(int64)123456789012LL, (int64)0x123456789012LL));

I think that new formats ("lld, "llx", "llX", ..) should be registered in IntDoubleRegister and IntFormatter should cast variables to int64 instead of int.

[Updated on: Sat, 19 June 2010 22:39]

Report message to a moderator

Re: int64 formating [message #27000 is a reply to message #26998] Sun, 20 June 2010 17:48 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Zbych wrote on Sat, 19 June 2010 16:39

Hi,

Format doesn't work with 64-bit variables on 32-bit platform. All (u)int64 numbers are shown as (u)int32. For example:

PromptOK(Format("%ld 0x%lX",(int64)123456789012LL, (int64)0x123456789012LL));



Technically, I think it is OK as 'ld' and 'lX' are "long" variants, which in effect means 32bits (implementation defined, but with MSC and GCC, it is so).

Quote:


I think that new formats ("lld, "llx", "llX", ..) should be registered in IntDoubleRegister and IntFormatter should cast variables to int64 instead of int.



Yes. Done.

Mirek
Re: int64 formating [message #27008 is a reply to message #27000] Mon, 21 June 2010 09:21 Go to previous message
Zbych is currently offline  Zbych
Messages: 325
Registered: July 2009
Senior Member
luzr wrote on Sun, 20 June 2010 17:48

Yes. Done.


Thank you.

Previous Topic: PatternMatchMulti problem
Next Topic: Whole word find string
Goto Forum:
  


Current Time: Sat Apr 27 16:42:58 CEST 2024

Total time taken to generate the page: 0.03124 seconds