jerry gay wrote:

yes, '.local' in a macro should mean the same thing as '.local' in
pir.

You've got it exactly.

to confuse the matter further, '.local' in a macro currently
means "create a unique label."

kjs's proposal changes that to '.label'

local in pir and macro language means create a local named variable

With no munging, agreed. '.local' is essentially ignored by the macro processor, and allowed to pass through unchanged to the resulting PIR code.

label in pir and macro language means create a label

Do you mean something like:

  .sub bar
    .label loop_start
    .label loop_end
    $I0 = 0
    .loop_start:
    if $I0 >= 3 goto .loop_end
    print $I0
    print "\n"
    inc $I0
    goto .loop_start
    .loop_end:
 .end

I can totally see the benefit of unique label generation in macros, but not so much in straight PIR code. Can you think of a code example to illustrate?

macro_local in macro language means create a local uniquely named
variable each time the macro is run
macro_label in macro language means create a uniquely named label
each time the macro is run

i'm not married to the name 'macro_', however the semantics are an
important macro language feature that we're currently missing.

Agreed with both, and the 'macro_' naming has the advantage of making it immediately clear that the features belong to macros.

Allison

Reply via email to