[Thread Prev][Thread Next][Index]

[ferret_users] high-to-low range for REPEAT over pseudo-variable



Hi all,

When I use a negative/empty repeat range, nothing is done (as is with
FOR loops in other programming languages), but if a pseudo-variable is
used, it happily counts (starting from the lowest number):


yes? repeat/range=1:0/name=ii ( say JA )
yes? repeat/i=1:0 ( say JA )
JA
JA
yes? let lolo = XSequence({ 1, 9 })
yes? repeat/i=1:2 ( list/noh lolo )
          1.000
          9.000
yes? repeat/i=2:1 ( list/noh lolo )
          1.000
          9.000
yes? repeat/i=2:1:-1 ( list/noh lolo )
          9.000
          1.000


Why is this?

Maybe the abstract i axis does not have a direction and Ferret is
making a best guess (assuming you don't want an empty range)?

—Marco


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement