initialize an array with set indexes?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

initialize an array with set indexes?

edA-qa mort-ora-y
Is there now a way to initialize an arrays with predefined index values?
That is, is there a constant form for:

var a = new Array<String>();
a[CONST_A] = "One";
a[CONST_B] = "Two";
...

Where all the CONST_X are static inline values.

--
edA-qa mort-ora-y
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

BigTPoker uses haXe and DHLIB
        http://BigTPoker.com/?source=haxe-list

The dis-Emi-A haXe Library
        http://wiki.disemia.com/HaXe
       
A full set of tools, classes, and support facilities aimed at
simplifying and expediting game creation in Flash 9.

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Sign: Please digitally sign your emails.
Encrypt: I'm also happy to receive encrypted mail.


--
haXe - an open source web programming language
http://haxe.org

signature.asc (260 bytes) Download Attachment