Associative Array Initalizers - Possible Syntax?

Derek Parnell derek at nomail.afraid.org
Tue Feb 13 17:53:08 PST 2007


I find this syntax reasonably unambiguous...

int[char[]] tab = [ "key" = 10, "key2" = 11 ];

bool[char] xyz = [ 'a' = true, 'b' = false, 'c' = false ];

double[int] qwerty = [ 23 = 17.24, 993 = 0.112 ] ;

char[][char[]] keyval = [ "lol" = "laugh out loud", 
                          "rtfm" = "read the manual",
                          "brb" = "be right back"
                        ]; 

-- 
Derek
(skype: derek.j.parnell)
Melbourne, Australia
"Justice for David Hicks!"
14/02/2007 11:48:02 AM



More information about the Digitalmars-d mailing list