This works in a macro:
src equ <arg> ;; a text item
sc = 3 ;; a number
ifidn <Test1>, src
push 1
elseifidn <Test2>, src
push 1
elseif sc eq 5 or sc eq 6
push 5
endif
I have googled a lot to find an equivalent or for the text item, e.g.
elseifidn <Test2>, src or idn <Test3>, src
elseif (src idn <gaga>)
etc but nothing works. Any ideas?
hi,
unfortunately there is no equivalent. Here is my suggestion for a Workaround:
@CmpStr macro str1:=<>,str2:=<>
IFIDN <&str1>,<&str2>
EXITM <1>
ELSE
EXITM <0>
ENDIF
endm
@CmpStrI macro str1:=<>,str2:=<>
IFIDNI <&str1>,<&str2>
EXITM <1>
ELSE
EXITM <0>
ENDIF
endm
...
elseif @CmpStr(<test2>,src>) or @CmpStr(<test3>,src)
...
regards, qWord
Quote from: qWord on February 26, 2009, 05:53:03 PM
unfortunately there is no equivalent.
Yeah, Masm is an old beast...
Quote
Here is my suggestion for a Workaround:
...
regards, qWord
Works like a charm - thanks for this elegant solution :U