Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Does Printf (et al.) have a size_t size spec?

May
12,846
164
Does Printf (and friends) have a size specification that's 32 bits on x86 and 64 bits on x64?

Thanks.
 
Charles, can you explain further? %X in the HEX type and I'd expect a prefix with it. What's %q?
According to TakeCommand.h, %q is a 64-bit integer and %X is a 64-bit hex integer in Printf(), Qprintf(), and ColorPrintf().
 
Charles, can you explain further? %X in the HEX type and I'd expect a prefix with it. What's %q?
OK, now I see the notes in TakeCmd.h. Hmmm! I've never used %q. And I have always used %X as in C/Win32 ... uppercase hex, with a prefix (usually l or I64) and never casting the matching argument.
 
That's why I asked, what you want to achieve. Because your question strikes prominently as an XY problem to me.
 
A related and more specific question:

Suppose I have a HANDLE h (void*, 32 or 64 bits) and I want to do this

Code:
Sprintf(szExpr, L"%%@FILECLOSE[<type>]", (cast?) h);
ExpandVariables(szExpr, 0);

Does Sprintf() know about the q type? Can I
Code:
Sprintf(szExpr, L"%%@FILECLOSE[%q]", (ULONGLONG) h);
 
Back
Top