[rrd-users] Re: RPN Tutorial with logical operators (AND/OR)?

Hugo van der Kooij hvdkooij at vanderkooij.org
Sun May 2 14:57:56 MEST 2004


On Sun, 2 May 2004, Laurent LEVIER wrote:

> At 00:41 02/05/2004, Arnold Nipper wrote:
> >I guess you already did the RRD - RPN - Tutorial
> >(http://www.rrdtool.com/tutorial/rpntutorial.html), didn't you?
> >http://xout.free.fr/rpne/tutor/tut.html also looks promising ...
>
> Yes, and I also found the other one searching for some infos on the net.
>
> But none is speaking about how to use AND/OR operators and how RPN managed
> when there are multiple 'IF' in the same line. :-/

Use it as maths. If TRUE = 1 and FALSE = 0 then you can use something
like:

 A AND B becomes (A+B) == 2
 A OR B becomes (A+B) > 0
 A EXOR B becomes (A+B) == 1

Converting this to RPN is left as an exercise to the reader.

Hugo.

-- 
 All email sent to me is bound to the rules described on my homepage.
    hvdkooij at vanderkooij.org		http://hvdkooij.xs4all.nl/
	    Don't meddle in the affairs of sysadmins,
	    for they are subtle and quick to anger.

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list