Experimental Physics and
| |||||||||||||||
|
The libCom calc subsystem is used by the calc and calcout records, Channel Access security module, MEDM and probably some other client tools to evalutate expressions. It provides separate operators for doing logical and bitwise operations, for example '&' is a bitwise AND while '&&' is a logical AND. The operator 'AND' is also supported as a synonym for the bitwise operator, and has parallel operators 'OR' and 'XOR'. When it comes to the unary NOT operations however, the operator 'NOT' does not match the bitwise '~' not operator, but instead performs a NEGATE operation like the unary minus operator. This obscure behavior is documented in the Record Reference manual. The current 'NOT' operator dates back to a time when the expression parser only supported the use of '-' as a binary subtraction operator, and for some reason the keyword 'NOT' was picked for the unary minus operator. However the ability to use '-' for unary minus was added by Janet in R3.12.0beta7 about 11 years ago, so I'm now proposing to change 'NOT' to be a synonym for the bitwise operator '~'. Please reply if you object to this change because your site uses 'NOT' in a significant number of CALC expressions of a 3.14 database or Access Security configuration file. To reward anyone who was interested enough to read to the bottom of this message, here's what I'm up to: I've been significantly improving the error checking and reporting from the expression parser, and have added an assignment operator ':=' and expression terminator ';'. A single CALC record can now return multiple results, although it is still subject to the 40 character limit for the expression string. - Andrew -- There is no S in exprexxo.
| ||||||||||||||
ANJ, 02 Sep 2010 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |