Global values - macros

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Global values - macros

cristiano1974
Dear Listers,
 I wonder if is possible to use global values into macro, some like a global
!let defined for all macros in syntax.

Thanks in advance.

Cristiano
Reply | Threaded
Open this post in threaded view
|

Re: Global values - macros

Raynald Levesque-2
Hi

Suppose you define the macro
DEFINE !globalVal() 150 !ENDDEFINE.

then you can use !globalVal within other macros. The thing to watch for is
that if !globalVal is used within a macro expression for instance
!CONCAT('var', !globalVal)
you MUST enclose your macro variable within an !EVAL function.
 !CONCAT('var', !EVAL(!globalVal))

Regards

Raynald Levesque
www.spsstools.net



On 7/19/07, Cristiano <[hidden email]> wrote:

>
> Dear Listers,
> I wonder if is possible to use global values into macro, some like a
> global
> !let defined for all macros in syntax.
>
> Thanks in advance.
>
> Cristiano
>
Reply | Threaded
Open this post in threaded view
|

Re:Global values - macros

Jerabek Jindrich
In reply to this post by cristiano1974
Hi Cristiano,

I'm affraid macro does not support global variables.
But you could define a macro, something like
DEFINE LetGlob() YourText !ENDDEFINE.
and call the macro at the place where the 'global' variable should be used.

HTH
Jindra

> ------------ Původní zpráva ------------
> Od: Cristiano <[hidden email]>
> Předmět: Global values - macros
> Datum: 19.7.2007 17:54:39
> ----------------------------------------
> Dear Listers,
>  I wonder if is possible to use global values into macro, some like a global
> !let defined for all macros in syntax.
>
> Thanks in advance.
>
> Cristiano
>
>
>