> The compiler doesn't differentiate the comma for bit #5 in the GREEN_LED > definition from the argument seperator in the Macro declaration. So it says > I supplied too many arguments thinking I meant to pass 5 arguments to the > macro as if : KEY_TOG 0x05,PORTA,5,PORTA,3 when what I actually meant was > KEY_TOG 0x05,(PORTA,5),(PORTA,3). > > I know this is just how text substitution IS supposed to work but is there > any other way around it ? You can't pass two macro parameters, then use them with one name inside the macro. Fortunately, you can still call the macro the way you are doing, but the macro itself will have to be written to receive all 5 arguments, something like: key_tog macro key, bit1_reg, bit1_bit, bit2_reg, bit2_bit This isn't that bad since the main code will still look the way you want it to, just the macro will look a bit different. ******************************************************************** Olin Lathrop, embedded systems consultant in Littleton Massachusetts (978) 742-9014, olin@embedinc.com, http://www.embedinc.com -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics