[Thread Prev][Thread Next][Index]

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



Hi Ansley—

On  3 Sep 12:24 Ansley C. Manke wrote:
> The REPEAT/RANGE syntax is set up to not interact with the context of 
> the variables, so as you thought it's interpreting a loop range of 
> /i=0:1  to not have any range. This seems like the right behavior, if a 
> little unexpected.

That was the part that I did expect.  REPEAT/RANGE does the thing that
Fortran, Julia &c. also do (in FOR loops), but as soon we use
pseudo-variables it becomes less intuitive in my mind.  After all the
experience, I still forget to "think like a Ferret".  :-)

> I'll add a note in the documentation about it.

Thank you, that's helpful.  I also agree the behaviour should not be
changed; it useful if it is documented that REPEAT/RANGE acts like FOR
loops in other languages and that REPEAT/I=... is different.

—Marco


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

Privacy Policy | Disclaimer | Accessibility Statement