Re: NXC: functions with different numbers of parameters?
Posted: 03 Aug 2012, 12:02
thank you John, the max negative float thing seems to be fixed!
Back to topic, I dont see why this works:
but that not:
and that also not:
Back to topic, I dont see why this works:
Code: Select all
#define printf1( _x, _y, _fmt, _val, style) { \
string sval = FormatNum(_fmt, _val); \
TextOut(_x, _y, sval, style); \
}
task main() {
printf1(0,40, "%4d", 5, DRAW_OPT_INVERT);
while(1);
}
Code: Select all
#define printf1( _x, _y, _fmt, _val, style=DRAW_OPT_NORMAL) { \
string sval = FormatNum(_fmt, _val); \
TextOut(_x, _y, sval, style); \
}
task main() {
printf1(0,40, "%4d", 5, DRAW_OPT_INVERT);
while(1);
}
Code: Select all
#define printf1( _x, _y, _fmt, _val, int style=DRAW_OPT_NORMAL) { \
string sval = FormatNum(_fmt, _val); \
TextOut(_x, _y, sval, style); \
}
task main() {
printf1(0,40, "%4d", 5, DRAW_OPT_INVERT);
while(1);
}