Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017 Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017
<== Date ==> <== Thread ==>

Subject: macro question
From: Rolf Keitel <rolf@triumf.ca>
To: tech_talk <tech-talk@aps.anl.gov>
Date: Fri, 27 Jan 2017 13:31:11 -0800
I could do some tests but it may be faster to ask:

I am looking at section 6.3.4 of the Application Developers Guide.

a) A macro instance can also provide a default value that is used when no macro with the given name has been defined. The default value can itself be defined in terms of other macros if desired, but may not contain any unescaped comma characters. The syntax for specifying a default value is as follows:
  $(name=default)

This seems to be clear: default value is used, if macro "name" is not defined.

b)  Finally macro instances can also contain definitions of other macros, which can (temporarily) override any existing values for those macros but are in scope only for the duration of the expansion of this macro instance. These definitions consist of name=value sequences separated by commas, for example:

$(abcd=$(a)$(b)$(c)$(d),a=A,b=B,c=C,d=D)

Am I correct that  is *not* a default value like in a), but that this expansion always happens and overrides a definition of the macro "abcd"?

Thanks - rolf -
-- 
+-------------------------------------------------------+
| Rolf Keitel, Ph.D.                Tel: (604) 222-7453 |
| TRIUMF                                                |
| Vancouver, B.C., Canada                               |
+-------------------------------------------------------+


Replies:
Re: macro question Andrew Johnson

Navigate by Date:
Prev: RE: Questions about set parameters to device by using epics Mark Rivers
Next: Re: macro question Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017
Navigate by Thread:
Prev: Re: monitor subscription in areaDetector Andrew Johnson
Next: Re: macro question Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017
ANJ, 14 Feb 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·