Sun Chili!Soft ASP Sun Chili!Soft
ASP Sun Microsystems

 

VBScript Dictionary Object

The Dictionary object stores data as key, item pairs.

Methods: VBScript Dictionary Object

VBScript Dictionary Object Add Method

Adds a key, item pair.

VBScript Dictionary Object Exists Method

Indicates if a specified key exists.

VBScript Dictionary Object Items Method

Returns an array containing all items in a Dictionary object.

VBScript Dictionary Object Keys Method

Returns an array containing all keys in a Dictionary object.

VBScript Dictionary Object Remove Method

Removes a key, item pair.

VBScript Dictionary Object RemoveAll Method

Removes all key, item pairs.

Properties: VBScript Dictionary Object

VBScript Dictionary Object CompareMode Property

The comparison mode for string keys.

VBScript Dictionary Object Count Property

The number of items in a Dictionary object.

VBScript Dictionary Object Item Property

An item for a key.

VBScript Dictionary Object Key Property

A key.

Syntax: VBScript Dictionary Object

Scripting.Dictionary

Remarks: VBScript Dictionary Object

A Dictionary object is the equivalent of a PERL associative array. Items, which can be any form of data, are stored in the array. Each item is associated with a unique key. The key is used to retrieve an individual item and is usually a integer or a string, but can be anything except an array.

The following code illustrates how to create a Dictionary object:

Dim d 'Create a variable

Set d = CreateObject("Scripting.Dictionary")

d.Add "a", "Athens" 'Add some keys and items

d.Add "b", "Belgrade"

d.Add "c", "Cairo"

...

Copyright 2002 Sun Microsystems, Inc. All rights reserved. Legal Notice.