Public Sub AddOrUpdate( _
ByVal vName As Variant _
, ByVal vValue As Variant _
, Optional ByVal vCompare As Variant _
Add a new definition (Name and Value pair) into the Symbol Table or update an existing Name and Value pair. Example:
Inserting a Value with the same Name as another Value in the table causes the previous Value to be overwritten.
Dim stTemp As New SymbolTable
stTemp.AddOrUpdate "FunctionName", 23
stTemp.AddOrUpdate "FunctionName", 24
stTemp.Count = 1See also:
Update FunctionvName: The string or numeric identifier associated with the value vValue.
vValue: Value that will inserted into the Symbol Table along with its identifier (or new Value that will replace the previous Value associated with Name). vValue can be any type of Variant value (vbString, numeric, vbDate, vbObject, vbArray, etc.).
vCompare: Specifies the type of string comparison used to determine if Names match. vCompare defaults to the value of the Compare Property if it is missing.
v2.0 Change: Changed the vCompare argument so that it can no longer be Null or non-numeric. It is still Optional though, so it can be missing.
Performance: This function can be inefficient because it scans the Symbol Table from end to beginning looking for the spefied Name.
v1.3 BugFix: This Subroutine has been fixed to support the storage of Object and DataObject type Values.
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.