Since it's not documented at all that I've seen, either for or against, I'm wondering what's the arguments to macros are supposed to be. Consider this code.

--------------
.const int TRUE = 1
.const int FALSE = 0

.macro IfElse(conditional, foo, bar)
    unless .conditional goto .$else
    .foo
    goto .$endif
    .local $else:
    .bar
    .local $endif:
.endm

.sub main :main
    .IfElse(TRUE,
        print "True\n"
    ,
        print "False\n"
    )
    .IfElse(FALSE,
        print "True\n"
    ,
        print "False\n"
    )
    .IfElse(FALSE, print "True\n", print "False\n")
.end
--------------
This will print True, then False, then False. Comma's aren't allowed for any of the statements(and they can be multilined), even commented out ones(which if this "feature" isn't a bug, that part is). By using pir's syntax, a lot of commas are eliminated, so it's at least somewhat of a practical thing. But since I doubt this is at all intended, is it a bug?

Joshua

Reply via email to