#23 %IFCTX/%IFID/%IFNUM/%IFSTR issue

open
nobody
None
1
2008-07-23
2002-05-27
Anonymous
No

In case of %IFCTX:

if (!tline) {
error(ERR_NONFATAL, "`%s' expects an argument",
directives[i]);
free_tlist (tline);
return -1;
}
j = FALSE;
...

In case of %IFID, %IFNUM, and %IFSTR;

if (!tline) {
error(ERR_NONFATAL, "`%s' expects an argument",
directives[i]);
free_tlist (tline);
return -1;
}
/*
* Note that the argument may "vanish" during
expansion.
* Which is why we had to check for its presence first.
*/
tline = expand_smacro(tline);
...

Discussion

  • nasm64developer

    nasm64developer - 2004-02-15
    • priority: 5 --> 1
    • status: open --> open-works-for-me
     
  • Victor van den Elzen

    • status: open-works-for-me --> open
     
  • Victor van den Elzen

    Logged In: YES
    user_id=2127992
    Originator: NO

    The current behaviour is like this:
    %ifctx takes a variable number of arguments and checks if one is equal to the current context. Giving it 0 arguments is silly, but legal.

    %ifid/num/str simply say that no argument (a "nothing" argument) is not an identifier/number/string. This behaviour is debatable, but I feel it may be useful sometimes with macros.

     

Log in to post a comment.