More than 5 function arguments not supported?
Posted: Thu Jan 08, 2015 2:49 pm
So I have a function
this one works fine. If I add one more argument
the code gets stuck at the end of the function which called drawArc. Changing it to
works fine. And it's also probably the better way to pass in a lot of arguments.
But just wondering where does the limitation to 5 function arguments come from?
Code: Select all
void drawArc(uint16 cx, uint16 cy, uint16 radius, uint16 thickness, uint16 start)
this one works fine. If I add one more argument
Code: Select all
void drawArc(uint16 cx, uint16 cy, uint16 radius, uint16 thickness, uint16 start, uint16 end)
the code gets stuck at the end of the function which called drawArc. Changing it to
Code: Select all
typedef struct {
uint16 cx;
uint16 cy;
uint16 radius;
uint16 thickness;
uint16 start;
uint16 end;
} drawArcParams;
void drawArc(drawArcParams params)
works fine. And it's also probably the better way to pass in a lot of arguments.
But just wondering where does the limitation to 5 function arguments come from?