Microsoft KB Archive/39517

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 10:19, 21 July 2020 by X010 (talk | contribs) (Text replacement - ">" to ">")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Base


Comparing String Arguments in Macros

Article ID: 39517

Article Last Modified on 10/17/2003



APPLIES TO

  • Microsoft Macro Assembler 5.0
  • Microsoft Macro Assembler 5.1 Standard Edition
  • Microsoft Macro Assembler 5.1a
  • Microsoft Macro Assembler 6.0 Standard Edition
  • Microsoft Macro Assembler 6.0a
  • Microsoft Macro Assembler 6.0b



This article was previously published under Q39517

SUMMARY

When using IF directives, relational operators could be used to form the conditions. Note: The relational operators treat the expressions as follows:

EQ and NE treat their operators as 16-bit numbers

LT, LE, GT, and GE treat their operators as 17-bit numbers.


The relational operators cannot be used for comparing string arguments. It is often necessary to compare string arguments in MACROs. IFIDN and IFDIF directives are available for this purpose. IFIDN grants assembly if two arguments are identical; IFDIF grants assembly if two arguments are different. The syntax is as follows:

    IFIDN <argument1>,<argument2>
    IFDIF <argument1>,<argument2>
                


Additional query words: 5.00 5.10 5.10a 6.00 6.00a 6.00b

Keywords: KB39517