From 9db6f8b8be5ac5b08431c13ecb6270cb15ff3209 Mon Sep 17 00:00:00 2001 From: Tobias Oetiker Date: Tue, 16 Sep 2014 11:21:31 +0200 Subject: [PATCH] add examples --- doc/rrdgraph_rpn.pod | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/doc/rrdgraph_rpn.pod b/doc/rrdgraph_rpn.pod index f1515fb1..cb3d1a9c 100644 --- a/doc/rrdgraph_rpn.pod +++ b/doc/rrdgraph_rpn.pod @@ -363,17 +363,27 @@ B pushes the current depth of the stack onto the stack -B + a,b,DEPTH -> a,b,2 -pop an integer (X) from the stack and copy the previous X items +n,B -B +push a copy of the top n elements onto the stack -pop an integer (X) and push the item at position X onto the stack + a,b,c,d,2,COPY => a,b,c,d,c,d -B -pop an integer (X) and rotate the content of the stack by X (positive is forward and negative is backward). +n,B + +push the nth element onto the stack. + + a,b,c,d,3,INDEX -> a,b,c,d,b + +n,m,B + +rotate the top n elements of the stack by m + + a,b,c,d,3,1,ROLL => a,d,b,c + a,b,c,d,3,-1,ROLL => a,c,d,b Z<> -- 2.47.3