X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=blobdiff_plain;f=doc%2Frpntutorial.pod;h=279d8fa4fcaab05b37083245293668f3116a1b0a;hp=b3beac1ded0735012874a4340affb79b1a833e38;hb=ebcf13305573a7eba0a4a54fcb1cb15ddc446b38;hpb=cb092381724e4ba8a1f18712fefc541a3d370f99 diff --git a/doc/rpntutorial.pod b/doc/rpntutorial.pod index b3beac1..279d8fa 100644 --- a/doc/rpntutorial.pod +++ b/doc/rpntutorial.pod @@ -55,7 +55,7 @@ GT, GE and EQ operators. While compound expressions can look overly complex, they can be considered elegantly simple. To quickly comprehend RPN expressions, -you must know the the algorithm for evaluating RPN expressions: +you must know the algorithm for evaluating RPN expressions: iterate searches from the left to the right looking for an operator. When it's found, apply that operator by popping the operator and some number of values (and by definition, not operators) off the stack. @@ -87,7 +87,7 @@ multiplication operator: 1) 128,8,*,7000,GT,7000,128,8,*,IF eval 128,8,* result is 1024 2) 1024,7000,GT,7000,128,8,*,IF eval 1024,7000,GT result is 0 - 3) 0,128,8,*,IF eval 128,8,* result is 1024 + 3) 0,700[C0,0,128,8,*,IF eval 128,8,* result is 1024 4) 0,7000,1024,IF result is 1024 @@ -102,7 +102,7 @@ with "A": 2) A,10,input,IF eval is A,10,input,IF read "if A then 10 else input". Now replace A with it's verbose -description againg and--voila!--you have a easily readable description +description again and--voila!--you have an easily readable description of the expression: if input > 10 then 10 else input