Put Key

Tags:  

Table of Contents  [ Hide]

Maps - Put Key

The put key Deluge task inserts a  key - value pair into the map variable.  If the specifed key is already present in the map-variable the key's associated value is replaced with new given value.

Syntax

<map1>.put(<key>,<value>);

where,

 

<map1> refers to the name of the map variable.
<key> the key to be inserted to the target map variable.
<value> the value to be associate with given key in the target map variable.

Example

   actions
{
on add
{
on load
{
map1 = map();
map1.put("John", "India");
map1.put("David", "USA");
}

}
}

0 Comments  Show recent to old
Post a comment


 RSS of this page