Promotic
WikipediaLinkedInYoutubeTwitterFacebook

GetVarType - method of object Pm

Description:
Returns the data type of the value.
Syntax:
GetVarType(vValue As Variant, [nMode As Long]) As String
Calling:
sType = Pm.GetVarType(vValue, nMode)
Parameters:
vValue(Variant) Any valid expression.
nMode[optional] (Long) Defines the level of detail of data type detection (especialy for object):
0 (default) - If the value contains object then its type is not being detected.
1 - If the value contains object then it is detected whether it is one of the following PROMOTIC objects: PmMap, PmArray, PmList, PmDateObject, PmAction or PmForm.
Return Values:
Returns one of the following strings that defines the data type of the vValue:
"undefined" - The value is not set.
"number" - The value is a number. The number type (whole number or floating point) and byte size are not distinguished. All number types are identified the same way.
"boolean" - The value represents a logical value false or true.
"string" - The value is a text string.
"object" - If nMode = 0 then the value contains arbitrary object (the object type is not distinguished). If nMode = 1 then the value contains object other than those listed objects.
"PmMap" - If nMode = 1 then the value is an object PmMap.
"PmArray" - If nMode = 1 then the value is an object PmArray.
"PmList" - If nMode = 1 then the value is an object PmList.
"PmDateObject" - If nMode = 1 then the value is an object PmDateObject.
"PmAction" - If nMode = 1 then the value is an object PmAction.
"PmForm" - If nMode = 1 then the value is an object PmForm.
Note:
The method can also be called in the graphic item events for Web Panels.

The method is functional also in Macro expression $.expr.

Example:
Dim sType
sType = Pm.GetVarType(-3.14) ' Returns "number"
Navigation:
 
- Pm
 
- Abs
- Cos
- E
- Exp
- GetVarType
 
 
- LN2
- PI
- Pow
- Sin
- Tan
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice