CValueSet:GetType


The GetType method returns the type of values in the CValueSet.

Syntax

sType = CValueSet:GetType()

bullet.gif    Returns a string for the type of the CValueSet as "number", "integer", "string", or "boolean".

Example

The following example creates a CValueSet S and adds members to it, then returns the count of members:

S = new_valueset("integer")

-- constructor, default to values of type "integer"

S:Add( "key 1", 15 )

-- add a key and value

S:Add( "key 2", -7125 )

-- add a key and value

S:Add( "key 3", 9 )

-- add a key and value

Printf("Type= %s", S:GetType())

-- result: Type = "integer"

S:SetType("string")

-- change the CValueSet values to "string"

Printf("Type= %s", S:GetType())

-- result: Type = "string"

Related Topics

CValueSet class, SetType, new

 


Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics, Inc. All Rights Reserved.