markleman
Joined: 30 Mar 2006 Posts: 5
|
Local labels in macros |
Posted: Tue Jul 22, 2008 8:06 am |
|
|
Hi All,
I wanted to define a macro to wait for a bit to be set.
However (as I expected) as soon as I invoke it more than once I get an "Identifier is already used in this scope" error because the label L1 is declared twice.
#define WAIT_BIT(bit) {\
L1:\
#asm\
BTFSS bit\
GOTO L1\
#endasm}
Is there any way to limit the scope of the label and make it 'local' to my macro? |
|