Thinking about the boundedness and unboundedness of expressions in unicon/icon, it finally dawned on me that the following and its ilk are eminently useful expressions particularly in developing certain piecewise linear solutions to some problems.
every i := if k < 10 then 1 to 10 else 10 to 20 do write("i:", i, " k:", k) Thank you Art and Steve regards Bruce Rennie On 19/03/16 12:46, Art Eschenlauer wrote: > Steve already explained that the argument of return was bounded. > I just found the following on pp 2-3 of the Icon Analyst issue 54, > regarding bounded expressions. > <http://www.cs.arizona.edu/icon/analyst/backiss/IA54.pdf> > It makes the behavior perfectly clear (once you get your head around > bounded expressions). > > I am reiterating what I found in the Analyst here, mostly for my own > future reference. > > Respectively (and hopefully correctly), "bN" and "uN" indicate bounded > and unbounded expressions: > > case b0 of { > b1 : u2 > b3 : u4 > . . . > } > every u1 do b2 > if b1 then u2 else u3 > not b > repeat b > return b > suspend u1 do b2 > until b1 do b2 > while b1 do b2 > { b1; b2; …; uN } > > ------------------------------------------------------------------------------ Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140 _______________________________________________ Unicon-group mailing list Unicon-group@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/unicon-group