SDL_PRIX64(3)
π SDL_PRIX64(3) β the SDL3 FUNCTIONS manual, bestie edition β¨
okay so you're in the SDL3 FUNCTIONS section of the manual and you clicked on SDL_PRIX64(3)? iconic. let's get into it π
β¨ NAME β¨
SDL_PRIX64 β it's a printf-formatting string that prints a Uint64 value as UPPER-CASE hexadecimal. that's it. that's the whole job. and it ate π
π¦ SYNOPSIS π¦
#include <SDL3/SDL_stdinc.h>
#define SDL_PRIX64 "llX"
no cap, that's the entire definition. one little macro. living its truth πΈ
π DESCRIPTION π
so the way that this works is you use it as a format specifier piece, and the manpage itself shows you exactly how, like:
SDL_Log("There are %" SDL_PRIX64 " bottles of beer on the wall.", bottles);
see how it's sitting right there inside the string literal, doing string-literal-concatenation main character energy? π«Ά you write %, then SDL_PRIX64, and the compiler stitches "llX" in so the whole thing reads as %llX at the end of the day. literally so satisfying.
and yes β the X is capital, so your hex digits come out as AβF in upper case, not lowercase. that's the whole point of this one. if you wanted lowercase you'd be looking at a different macro, bestie, and this is not that macro π₯
π AVAILABILITY π
this macro has been available since SDL 3.2.0. so if you're on something older, sorry babe, no SDL_PRIX64 for you π upgrade and slay β¨
β quick vibe check: it's a #define, not a function. no linking drama, no runtime cost, just vibes and preprocessing. periodt.
and that's the tea π β this page came out of the Simple Directmedia Layer docs, version SDL 3.4.18, dated with all the SDL_PRIX64(3) energy you'd expect. go print some uppercase hex, you absolute legend ππ
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms