[Swift-devel] New syntax for appending to arrays
Yadu Nand
yadudoc1729 at gmail.com
Tue Jun 28 08:40:43 CDT 2011
Hi,
As proposed earlier, a new syntax for appending values to
arrays have been implemented. Examples are given below.
int array[ ] [ ] ;
array ["key1"] += 10;
array ["key1"] += 20;
foreach value, index in array["key1"] {
trace ( array[index]) ;
}
Please note that, we still need to make sure that when we can
only append to an array, so to associate keys and multiple
values, (i think) we will need two(or more) dimensional arrays.
Please let me know if I need to make any changes. I've attached
a diff to this mail.
Implementation for type definition for array subscripts at
declaration is still pending. I'm working on that now.
--
Thanks and Regards,
Yadu Nand B
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fourth.patch
Type: text/x-patch
Size: 7203 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/swift-devel/attachments/20110628/68b9f2c1/attachment.bin>
More information about the Swift-devel
mailing list