Hi community!

Is it possible to make an IF-statement in a macro that contains both, numerical and string expressions? My macro must check if some argument is empty and if some other, numerical arguments are in a certain range.
Until now, I could only solve it by using this code:



IFB <arg>
temp = 1
ELSE
temp = 0
ENDIF


But it would be much better if I could include something like <arg4> EQ <> directly into the IF statement.

Thank you very much in advance! :alright:
Posted on 2005-01-10 17:03:27 by key2k3
Hrmmm .... it doesn't seem like there's a coder out there who has had this problem (?!) so I took this quick workaround:



@IsBlank MACRO arg1:=<>
IFB <arg1>
EXITM <1>
ENDIF
EXITM <0>
ENDM


This can be used directly inside IF statements. Nevertheless, I still appreciate any replies on this topic.

Thanks!
Posted on 2005-01-11 13:32:56 by key2k3
you probably want
IFDIFI <string>,<>
IF num LT ;; NE EQ LT GT

but you better study chapter 9
http://web.sau.edu/LillisKevinM/csci240/masmdocs/index.htm#MASM Programmer's Guide
alt. here
http://webster.cs.ucr.edu/Page_TechDocs/index.html
Posted on 2005-01-11 19:58:45 by drizz