BartmanAbyss / vscode-amiga-debug

One-stop Visual Studio Code Extension to compile, debug and profile Amiga C/C++ programs compiled by the bundled gcc 12.2 with the bundled WinUAE/FS-UAE.
GNU General Public License v3.0
314 stars 39 forks source link

KPrintF vs. fmt #82

Closed apannwitz closed 2 years ago

apannwitz commented 2 years ago

Is it possible to print out an unsigned integer for debugging? The following does not work:

unsigned int x=10;
KPrintF("x=%u", x);

Did I miss something?

BartmanAbyss commented 2 years ago

yes, a bit unintuitively, the format specifiers are amiga-specific. See here. So in you're case you should use %ld (int = "l", decimal = "d"). %lu has been added with Kickstart 2.0, so it won't work with Kickstart 1.3

apannwitz commented 2 years ago

Hey, thank you. That works!