[rrd-users] Color working hours, RPN expr.

mrugan mrugan at softhome.net
Tue Feb 3 12:47:09 MET 2004


Hy,

i've noticed the final expression that came out after multiple
"Re: Color working hours" posts and i was wondering if anyone of the
"producers" would like to write this expression in traditional
notation.
i've tried this going step by step in the rpn and seemed that i didn't
understood corectly the use of DUP.
"DUP will duplicate the top of the stack, pushing the result back onto
the stack" ...
so "1,2,3,DUP" will duplicate 1 as 1x2 resulting 2 so the stack will look like 2,3,2
   (pushing back into the next free place that is the third place ?)
or duplicating meaning the stack is going to look like 1,2,3,1

Anyways "in,POP,1,2,3,DUP" hangs on rpn error "RPN final stack size != 1"
so please... anyone rrd-rpn-guruz can "translate" to traditional notation the expression:
CDEF:wdtest=in,POP,TIME,3600,/,1,+,DUP,24,/,7,%,DUP,4,LT,EXC,2,GE,+,2,LT,EXC,24,%,DUP,8,GE,EXC,18,LT,+,2,EQ,1,0,IF,0,IF
while explaining the use of DUP and % (modulo operation) ?

thanks.a lot. [if any ...]
--------------
mrugan

--
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