flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > #ifndef problem |
Author |
|
afw2004 30 Jun 2005, 15:00
How can I check if symbol is defined in FASM? (like #ifndef in C++)
|
|||
30 Jun 2005, 15:00 |
|
Tomasz Grysztar 30 Jun 2005, 15:10
For the label or numerical constant (which are defined at assembly stage) it would be:
Code: if defined symbol ; ... end if This operator checks whether the symbol is defined anywhere in source (with prediction), not only whether it was defined earlier. Read part 4 of this article for more details about this specific problem. For the symbolic constant (defined with EQU, processed at preprocessing stage), it can be something like this example from the manual: Code: match =TRUE, DEBUG { include 'debug.inc' } to check for specific value; or something like this: Code: match =DEBUG, DEBUG { } to check whether DEBUG constant was not defined at all. |
|||
30 Jun 2005, 15:10 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.