Gregory Lypny a �crit :
> 
> Hi Everyone,
> 
>      Can the "for each" form of the repeat structure be used to transform
> one itemized list into another?
> 
>      For example, if variable X = 2, 4, 6, I'd like to create variable Y
> as the square of the items of X, so that Y = 4, 16, 36.
> 
>      I tried doing this:
> 
>           Repeat for each item i in X
>                put i^2 into item i of Y
>           end repeat
> 

because the for each repeat structure is "read-only", just try :

        Repeat for each item i in X
                put i^2 & "," after Y
        end repeat
        put char 1 to -1 of Y into Y

>      But what I get is a long list of commas (empty items) and a single
> number at the end (36).
> 
>      Any thoughts on this?
> 
>           Regards,
> 
>                Greg
> 
> 
> 
> _________________________________________
> Gregory Lypny
> Associate Professor of Finance
> Concordia University
> 
> _________________________________________
> "Take chances, make mistakes!"
>        - Ms Frizzle, The Magic School Bus
> 
> Archives: http://www.mail-archive.com/[email protected]/
> Info: http://www.xworlds.com/metacard/mailinglist.htm
> Please send bug reports to <[EMAIL PROTECTED]>, not this list.

Regards, Pierre Sahores

chef de projet cyberlibrairie
SNPIN - CNDP. 91, rue Gabriel-Peri
92120 Montrouge. T�l.: 01.64.45.05.33

Penser la part du r�ve et
produire l'avantage comp�titif.

Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.

Reply via email to