I'm working on my own set of macros to help save time in my next project, and one thing I was searching for was detecting if an identifier already exists like this:
.ifdef .ident(.concat(.string(arg), "_my_useful_suffix")) ;This does not work, it wants an actual identifier here, even if using what .ident returns DIRECTLY would assemble
.endif
I'm able to work around this, but if this could work it'd help me make these macros that much more useful. I was surprised it does not work. Mainly because .ident can be used to generate code that references an existing symbol---apparently you just can't TEST for existence.
Code:
.ifdef .ident(.concat(.string(arg), "_my_useful_suffix")) ;This does not work, it wants an actual identifier here, even if using what .ident returns DIRECTLY would assemble
.endif
I'm able to work around this, but if this could work it'd help me make these macros that much more useful. I was surprised it does not work. Mainly because .ident can be used to generate code that references an existing symbol---apparently you just can't TEST for existence.