[Gambas-user] New syntax for creating collection
Benoit Minisini
gambas at ...1...
Tue Nov 11 18:24:52 CET 2008
Hi,
I added a new syntax for creating collection in Gambas 3, revision #1699.
Here it is:
[ <key1> : <value1> , <key2> : <value2> , ... ]
For example:
Dim cCol As Collection = ["blue": &H0000FF&, "white": &HFFFFFF&, "red":
&HFF0000&]
Print cCol["blue"]
--> 255
Note that as Gambas functions cannot take more than 63 arguments, you cannot
initialize the collection with more than 31 elements.
Regards,
--
Benoit Minisini
More information about the User
mailing list