[Info-vax] Bliss

Lawrence D'Oliveiro ldo at nz.invalid
Sat Jul 27 00:36:45 EDT 2024


On Fri, 26 Jul 2024 02:10:19 -0000 (UTC), I wrote:

> Adapted this example from page 15-9:

This version does work:

    MODULE quote_test_2 =
    BEGIN
        OWN x;
        MACRO mark = 4 %;
        MACRO m = (mark) + %UNQUOTE mark %;

        GLOBAL ROUTINE doit : NOVALUE =
        BEGIN
            MACRO %QUOTE mark = 5 %;
            x = m;
        END;

    END ELUDOM

But note the parentheses around “(mark)”; it doesn’t seem to get the 
addition right without that.

Generated code:

    doit:
        ...
        movq    $9, x(%rip)
        retq

The problem seems to be that the handling of the %UNQUOTE construct is 
only expecting the following name to be that of a macro, not a literal or 
anything else.



More information about the Info-vax mailing list