[Thread Prev][Thread Next][Index]

[ferret_users] Re: whether break statement is available in ferret ?



Hi Akshay,
You can get the location of an element in a variable in Ferret using the @loc transformation

let i1 = myvar[i=@LOC:1111]
let i2 = myvar[i=@LOC:999]

repeat/i=`i1`:`i2` (  commands...)



On 3/15/2013 11:11 AM, Akshay Hegde wrote:
HI All !

I want to do some calculation in ferret, which I have already done
using IF ELSE, FOR LOOP, and BREAK Statements in C,
it is some thing like this, let me take one example here

myvar={1000,1111,1333,1444,1555,1666,999,888,333,222,111 }

here I want to list out only 1111,1333,1444,1555,1666

If break statement is available in ferret, I think it's possible by
taking starting increment value(1111) index and ending value(999)
index, by putting in loop and listing.


Thanks in advance,


Akshay



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

Privacy Policy | Disclaimer | Accessibility Statement