At 19:25 02/26/99 +0100, Josef Hanzal wrote: >I would like to have macro, which behaves differently when argument is >defined and when it is not. The manual says, that argument which is omitted >equals to an empty string, but I cannot find a way, how to test for string >lenght. Has someone already solved this? I tried the following way, but it >is not working, as there is no substitution for MENUITEM in the IFDEF >statement when macro is invoked. I tried several more complicated ways, but >no good results so far. Any suggestions? MPASM 2.15 > >STRING MACRO STR,MENUITEM >STR#V(STRNO): DT STR,0 > IFDEF MENUTITEM >MENUITEM: EQU STRNO > ENDIF > ENDM i'm not really familiar with mpasm, but a few things caught my eye: >MENUITEM: EQU STRNO shouldn't that be without colon? > IFDEF MENUTITEM if it says that the "argument which is omitted equals to an empty string" you maybe could try something like IF MENUITEM = "" or IF "MENUITEM" = "" your version asks whether the item is defined, and if it is an empty string, it may as well be =defined= as an empty string... ge