03.12.2009, 16:24
Hello!
I've been trying to make my own printf function that only gets called if debug mode is on. I however can't get them working with strings in it. I made them for integers and floats though but that's useless for me. I tried using getarg to use it at printf.
I read about making a #define to bypass this problem. It didn't work with the state machines at me. I'm not sure if it's even possible what I want but perhaps anyone knows more?
My code:
I've been trying to make my own printf function that only gets called if debug mode is on. I however can't get them working with strings in it. I made them for integers and floats though but that's useless for me. I tried using getarg to use it at printf.
I read about making a #define to bypass this problem. It didn't work with the state machines at me. I'm not sure if it's even possible what I want but perhaps anyone knows more?
My code:
Код:
sprintf(const format[], {Float,_}:...) <debug:on> { printf(format, getarg(1)); }