Create Map

Tags:  

Table of Contents  [ Hide]

Create Map

The Create Map deluge syntax creates a new empty map expression. If the target map variable is already defined as map variable, then all its content will be erased. The map expression related tasks (put, putAll, remove, clear) and opertions can be done only if the map variable is defined.

map() - map constructor to create and initalize map variable.

Example

In the following sample code, a map named map1 is defined in the on add -> on load block and initialized with the map() constructor.

    actions
{
on add
{
on load
{

map1 = map(); // map constructor to initalize the map variable named map1.
map1.put("creator","http://creator.zoho.com");
map1.put("writer","http://writer.zoho.com");
map1.put("sheet","http://sheet.zoho.com");

}
}


0 Comments  Show recent to old
Post a comment


 RSS of this page