-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: shiyu_has
Message 1 in Discussion



function HashTable()

{

this.length = 0;

this.items = new Array();

for (var i = 0; i < arguments.length; i += 2) {

if (typeof(arguments[i + 1]) != 'undefined') {

this.items[arguments[i]] = arguments[i + 1];

this.length++;

}

}



this.removeItem = function(in_key)

{

var tmp_value;

if (typeof(this.items[in_key]) != 'undefined') {

this.length--;

var tmp_value = this.items[in_key];

delete this.items[in_key];

}



return tmp_value;

}

this.getItem = function(in_key) {

return this.items[in_key];

}

this.setItem = function(in_key, in_value)

{

if (typeof(in_value) != 'undefined') {

if (typeof(this.items[in_key]) == 'undefined') {

this.length++;

}

this.items[in_key] = in_value;

}



return in_value;

}

this.hasItem = function(in_key)

{

return typeof(this.items[in_key]) != 'undefined';

}

}

 

 

usage

====

var htb= new HashTable;

htb.setItem("A","One");
 htb.setItem("B","Two");
 


 
 







Shiyas Mattummal

Planvisage software solutions 

Bangalore

Mob: 09986049564
[EMAIL PROTECTED]

[EMAIL PROTECTED]







 




       Get the freedom to save as many mails as you wish. Click here to know 
how.

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member 
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you 
received this message by mistake, please click the "Remove" link below. On the 
pre-addressed e-mail message that opens, simply click "Send". Your e-mail 
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to