[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pred & succ ?



Andrew wrote:
> 
> In article <3A0FA91A.7BEE1D07@dkrz.de>,
>   Martin Schultz <martin.schultz@dkrz.de> wrote:
> >
> > FUNCTION pred, x
> >    RETURN, x-1
> > END
> > FUNCTION succ, x
> >    RETURN, x+1
> > END
> >
> 
> Thanks, Martin.  I take that as a "no", though.
> 
> I was thinking of a general, built-in (thus fast),
> function that returns the successor or predecessor
> of any ordinal variable.
> 
> I knew I could write x-1, etc.. :-)
> 

Well, the point is that x-1 already is quite fast because IDL is array
oriented. I'm not sure whether you could gain anything significant by
having this as a builtin function. 

Cheers,
Martin



-- 
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[
[[ Dr. Martin Schultz   Max-Planck-Institut fuer Meteorologie    [[
[[                      Bundesstr. 55, 20146 Hamburg             [[
[[                      phone: +49 40 41173-308                  [[
[[                      fax:   +49 40 41173-298                  [[
[[ martin.schultz@dkrz.de                                        [[
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[