From: H. P. A. <hp...@zy...> - 2008-10-15 05:33:05
|
Frank Kotler wrote: > > Unfortunately, I don't know the answer to your question. Possibly > "%ifidni" instead of "%ifdef" would get rid of the "identifier > expected"??? I haven't had a chance to try this out... I'm not sure if > there's a way to do what (I think) you want... Must be... > %ifdef, for obvious reasons, do not expand macros in its argument, so "FlagVal %+ %1" probably ends up with either nonsense or something like "FlagVal%1", neither of which is what is desired here. I think a much easier way to do what the original poster wants is probably to use equates: %define NextFlagEnum 1 %macro FlagEnum 1.nolist FlagVal. %+ %1 equ NextEnum %assign NextFlagEnum NextFlagEnum+1 %endmacro Since equates are symbols, not macros, NASM will do the erroring out for duplicate definitions. -hpa |