In that case, maybe just call it ROTATE.  This would give the maximum 
flexibility..

x1, x2 .... xn, n, steps, ROTATE
where
n > 0
0 < abs(steps) < n

I'm trying to think of an efficient way to do this that doesn't involve a 
malloc (it's easy if you can malloc(n*sizeof(double*)) ).  Will have a go when 
I'm in the office tomorrow.

However should we keep ROL and ROR as shorthand for the more common 3,1,ROTATE 
and 3,-1,ROTATE ?

Steve

Steve Shipway
University of Auckland ITS
UNIX Systems Design Lead
s.ship...@auckland.ac.nz
Ph: +64 9 373 7599 ext 86487


________________________________________
From: Tobias Oetiker [t...@oetiker.ch]
Sent: Monday, 28 April 2014 6:30 p.m.
To: Steve Shipway
Cc: rrd-developers@lists.oetiker.ch
Subject: Re: [rrd-developers] ROL and ROR for RPN

Hi Steve,

your function always affects 3 values ... would there be any gain
in makeing this call more generic ?

a,b,c,d,x,y,ROL rotate the last x values on the stack by y steps to
the left. and maybe have -y role to the right?

cheers
tobi

_______________________________________________
rrd-developers mailing list
rrd-developers@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-developers

Reply via email to