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 (integer or floating point) and byte size are not distinguished. All number types are identified the same way here. In order to detect whether it is an integer use the Pm.IsInt method.
"boolean" - The value represents a logical value false or true.
"string" - The value is a text string.
"vbarray" - The value is a VBScript aray.
"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 and in the onDraw event of the PmiCanvas graphic item.

Example:
Dim sType
sType = Pm.GetVarType(-3.14) ' Returns "number"
PROMOTIC 8.3.21 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
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