flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
vid
I can't believe this still isn't in the FAQ. Tomasz, place it there.
"defined" operator means "defined anywhere in source", not "defined previously in source" like in C. and "if a is not defined then a is defined" is paradox, there is no way to interpret it, and so code cannot be generated ![]() if you want "defined previously" then i suggest this macro: Code: ;============================================== ;ifndef ;desc: checks if expression (usually symbol) is not "defined" previously ; in code (not in whole file, like with "if ~defined expr") ;args: expr - any expression acceptable as argument to "defined" operator ;note: end block with "end if", just like any "if" command macro ifndef expr* { local ..HERE if defined ..HERE | ~ defined expr ..HERE = 1 } ifndef GetFilePart extrn '_GetFilePart@8' as GetFilePart:dword end if |
|||
![]() |
|
okasvi
heh, thanks for the macro
I did read manual about if ~defined but I think I got it wrong ![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.