Re: isExist in associate array

2008-12-10 Thread Jarrett Billingsley
On Wed, Dec 10, 2008 at 12:16 PM, Spacen Jasset <[EMAIL PROTECTED]> wrote: > Also useful: > > char[] value; > if ( (value = "test1" in t) ) { >writefln(value); > } > Almost; it's char[]* value, since in always returns a Value* type. (and it would then be writefln(*value)) Aaalso useful:

Re: isExist in associate array

2008-12-10 Thread Spacen Jasset
Ellery Newcomer wrote: raymond wrote: how to check if array key exist in array or not? for example char[] [char[]] t; t["tes1"]="val1"; t["tes2"]="val2"; t["tes3"]="val3"; if (t["test1"]) writefln("NONE"); if("test1" in t) writefln("exists"); Also useful: char[] value;

Re: isExist in associate array

2008-12-09 Thread Ellery Newcomer
raymond wrote: how to check if array key exist in array or not? for example char[] [char[]] t; t["tes1"]="val1"; t["tes2"]="val2"; t["tes3"]="val3"; if (t["test1"]) writefln("NONE"); if("test1" in t) writefln("exists");

isExist in associate array

2008-12-09 Thread raymond
how to check if array key exist in array or not? for example char[] [char[]] t; t["tes1"]="val1"; t["tes2"]="val2"; t["tes3"]="val3"; if (t["test1"]) writefln("NONE");