EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  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  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: CALC expression feature request
From: Andrew Johnson <[email protected]>
To: Benjamin Franksen <[email protected]>
Cc: [email protected]
Date: Thu, 20 Mar 2008 10:17:37 -0500
Benjamin Franksen wrote:
It would be very useful if in CALC expressions (e.g. in calc and calcOut record) one could call MIN and MAX with an arbitrary (two or more) number of arguments, instead of only exactly two as it is to date.

I agree that it would, and someone (I forget who) created a version that could do that, but that implementation involved pushing a marker (probably a NaN) onto the value stack to indicate the start of the argument list. This approach is no longer feasible since the calc engine now properly handles NaN and Inf values, so they can't be used as markers like that.


Supporting variable length argument lists could mean some fairly significant rework on the current base/src/libCom/calc/postfix.c parser, although it may not be as hard as I think for someone with a good understanding of compilers and parsers. We do have a fairly good test suite for the CALC engine in the libCom/test area now, so this is a fairly self-contained work package for anyone who wants to look at it (email me first though).

Thanks Ben, I've added this to the list.

- Andrew
--
When a distinguished but elderly scientist states that something is
possible, he is almost certainly right.  When he states that something
is impossible, he is very probably wrong.  -- Arthur C. Clarke

References:
CALC expression feature request Benjamin Franksen

Navigate by Date:
Prev: RE: Memory Problem related to CA? Jeff Hill
Next: Re: EPICS: Selecting a Text Error Message Carl Lionberger
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: CALC expression feature request Benjamin Franksen
Next: VME module identification tagging and storage Harms, Michael JJ
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·