EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: found a bug in 3.13.9 dbLoadTemplate - after all that time
From: "J. Frederick Bartlett" <[email protected]>
To: "Kraimer, Marty" <[email protected]>
Cc: "Bartlett, Fritz" <[email protected]>, "Chestnut, Ronald P." <[email protected]>, "Mooney, Tim" <[email protected]>, <[email protected]>, "kuner" <[email protected]>
Date: Wed, 2 Jun 2004 20:13:42 -0500
Marty,

  I agree with Tim. The behavior of dbLoadTemplate is contra-intuitive and
could, as it already has, lead to template expansions whose errors are hard
to diagnose. Keeping the old behavior, which satisfies the grandfather
applications, and adding the warning message, which would save diagnostic
time for others, appears to me to be an excellent solution.

  With ~20 thousand template expansions I am surprised that D0 has not been
impacted by this problem (maybe it has, and I don't know it, which is
worse).

										Fritz

> -----Original Message-----
> From: Tim Mooney [mailto:[email protected]]
> Sent: Wednesday, June 02, 2004 12:09 PM
> To: Chestnut, Ronald P.
> Cc: 'Marty Kraimer'; kuner; [email protected]
> Subject: Re: found a bug in 3.13.9 dbLoadTemplate - after all that time
>
>
> Marty Kraimer wrote:
>
>  > First I want to make sure I understand what you are saying.
>  >
>  > If a substitution file contains
>  >
>  > file test.template {
>  > { NAME="X", HOPR="9", LOPR="1"}
>  > }
>  > file test1.template {
>  > { NAME="Y" }
>  > }
>  >
>  > You are saying that any appearences of $(HOPR) or $(LOPR) in
>  > test1.template should NOT be expanded.
>  >
>  > Both dbLoadTemplate and msi (Macro Substitution and Include) expand
>  > $(HOPR) and $(LOPR) using the last definition they received.
> Thus in the
>  > above they will be expanded using HOPR="9", LOPR="1"
>  >
>  > I can see either semantic definition being valid. Since the existing
>  > semantics have been in use for many years, it does not seem to be good
>  > idea to make a change. Many users may rely on the existing semantics.
>
> Yuck!  If I am relying on this, I wanna know about it and fix it.
> I've been assuming I don't have to scrutinize substitutions files
> for typos -- like this nasty little sample squasher:
>
> file test.template {
> { NAME="X", DESC="Unused channel", HOPR="10", LOPR="-10"}
> ....
> }
> file test1.template {
> { NAME="Y", DESC="Lens-to-sample", HOPR="6.3", LOPF="5.7"}
> ....
> }
>
> How about if dbLoadTemplate() issues a warning when it uses an old
> macro definition?
>
> --
> Tim Mooney ([email protected]) (630)252-5417
> Beamline Controls & Data Acquisition Group
> Advanced Photon Source, Argonne National Lab
>
>


Replies:
RE: found a bug in 3.13.9 dbLoadTemplate - after all that time Ralph Lange
References:
Re: found a bug in 3.13.9 dbLoadTemplate - after all that time Tim Mooney

Navigate by Date:
Prev: RE: found a bug in 3.13.9 dbLoadTemplate - after all that time Mark Rivers
Next: Re: organizing extensions/applications Ralph Lange
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: found a bug in 3.13.9 dbLoadTemplate - after all that time kuner
Next: RE: found a bug in 3.13.9 dbLoadTemplate - after all that time Ralph Lange
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·