I assume that I would get an error message for

FOO      MACRO ,
         GBLA  &BAZ
         MEND  ,

BAR      MACRO ,
         GBLB  &BAZ
         MEND  ,



--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3

________________________________________
From: IBM Mainframe Assembler List [[email protected]] on behalf 
of Jonathan Scott [[email protected]]
Sent: Tuesday, June 27, 2023 1:04 PM
To: [email protected]
Subject: Re: Conditional assembly variable scope

> Would any know the difference in scope
> Of a local used in open code and a global used
> In a macro the both seem to have a scope of the entire assembly

A local variable is unique to the context where it is defined,
so a local variable defined in open code applies to all open
code, and a local variable in a macro is defined only in that
macro.  If the same name is used for a local variable in a
different context, it refers to a separate variable.

A global variable is the same variable in all contexts where it
is defined.

Jonathan Scott, HLASM
IBM Hursley, UK

Reply via email to