Gil, all,

You suggest that a declaration for a variable with a leading ampersand
should have the variable name evaluated before it is actually declared.

Not only would that break most existing code (I do not recall ever having
seen a variable declaration without a leading ampersand), it would
also duplicate existing logic and syntax for created set symbols,
adding even more confusion than we already have.
Created set symbols use a different syntax to disambiguate them from
the proposed syntactical construct.

I do not _know_ why the ampersands on the variable declarations
can be omitted, but it probably relates to compatibility with
one or more of HLASM's predecessor assemblers.

Since it is pretty confusing to leave out the leading ampersand,
I would advise not to use this syntactical feature.
Stick with the ampersands. Life is complex enough as it is.

And if you need to declare created set symbols,
use the existing &(&foo) notation. Works like a charm :-)

Kind regards & happy programming!
Abe Kornelis
==========


Op 28/06/2023 om 16:59 schreef Paul Gilmartin:
> On 6/28/23 08:17:20, Dave Clark wrote:
>> "IBM Mainframe Assembler List" wrote on
>> 06/28/2023 10:09:27 AM:
>>> Just looked at the doc for LCLC says for variable symbol says can be
>>> with or with out leading &
>>>
>>> However when I tried to do a SETC against it I got a assembly error
>>
>>          I believe that it means LCLC does not require the leading
>> ampersand but in all other uses the leading ampersand is required -- and
>> it is the same variable.
>
> That's gratuitous flexibility that adds no expressive power,
> but leads to confusion, as in the original ply.
>
> Rather, for consistency, symbols appearing as operands of
> LCLC should be evaluated:
>
> &NAME    SETC  '&&X'
>          LCLC  &NAME
>
> ... should declare &X to be a local symbol.
>
> (What about LCLA and LCLB?)
>

Reply via email to