Experimental Physics and
| |||||||||||||||||
|
I would like to suggest a small enhancement for the calcRecord, calcoutRecord and waitRecord code that uses the postfix routine. This enhancement will allow the MAX and MIN operators to be used on many more input fields than is currently possible due to the limited number of characters permitted in the CALC fields of these records. I like the idea that MAX and MIN should be able to take variable numbers of arguments, using this syntax: MAX(A,B,C,D,E,F,G,H,I) However I'm not sure how easy this would be to add to the parser. I know I can do the calculation with a select record and a calcout, but these records are used in a time sensitive part of my database and the calculation is nested quite deeply. If at all possible, I would like to complete the operation using a single calcout record. I would have thought that a subroutine record would be significantly faster than using a calc for this - admitedly it's not going to be quite as flexible at runtime, but a lot less work in the short term than changing the calculation engine and parser. If you need the output capability of calcout, you might want to look at Andy Foster's genSub record which is an enhanced subroutine record that provides output links. Unfortunately, most of the obvious punctuation characters have already been used for other operations, but I suggest that "|<" and ">|" might be suitable as binary MIN and MAX operators, respectively. The GNU C++ compiler has a built-in extension for MIN and MAX that uses <? and >? respectively as the binary operators. Although I'd prefer that we stick as close as possiblt to the standard C operators and function syntax, if a variable-length MIN() and MAX() can't easily be developed it's probably better to regard g++ as a sort of standard and re-use their operators. - Andrew -- Tongue-twister: Say "Peggy Babcock" 10 times without stumbling...
| ||||||||||||||||
ANJ, 10 Aug 2010 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |