Quote Originally Posted by Darrel Taylor View Post
If paramaters are ommited, they show up as "undefined".
Then you can just do a IFNDEF to see if a parameter was included or not.
However, since PM can't "Nest" macro's. It doesn't help a bit.
Not to mention the 18F problem.
And like you've both already pointed out...
MPASM can't do either one of them.
<br>
I've come up with a half-way solution to what I want.
I just take the standard @printstr macro, keep all of my parameters inside of the quotes, and count the number of comma's inside the quotes and act accordingly:
4 comma's, all parameters, x, y, string, forecolor, backcolor
3 comma's, all but backcolor
2 comma's, all but colors.
Only limitation is that I can't use a comma (or double-quote, or single-quote) in the string.
Basic string parsing code at work...
Not the optimal solution, not my preferred solution, but it'll work.