On 11.05.2022 16:05, Jeremy Nicoll wrote:
On Sun, 8 May 2022, at 19:15, Rony G. Flatscher wrote:
center=(0,0,0) -- array for center point
Why does that not need to be something like
center = .array~new(0,0,0) ?
Ah, this is new syntax sugar in ooRexx 5.0, a comma separated list of values - depending on the
location - will cause the creation of an array object containing the comma separated items.
Actually in this particular case it would have been even possible to write:
center=0,0,0 -- will create an array of these elements
Hence you can also do something like:
do n over "anthony", "berta", "caesar" -- will create an array and allow to
iterate over it
say n -- will output one name after the other
end
Or using the new "do with" ... "over" for using a supplier for the iteration:
do with index idx item obj over "anthony", "berta", "caesar"
say idx":" obj
end
will yield:
1: anthony
2: berta
3: caesar
---rony
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel