Core Function GetVarObjType
From Sputnik Wiki
(Difference between revisions)
(→Return Value) |
(→Example) |
||
Line 41: | Line 41: | ||
=== Example === | === Example === | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Checking using @ Macro of the numeric | Checking using @ Macro of the numeric |
Revision as of 20:49, 2 August 2014
GetVarObjType( $variable )
Contents |
Description
Get the common object type of a variable (If it is an object)
Parameters
variable
The variable to check.
Return Value
Returns the common object type a variable as a numeric value types are:
[TYPE] [@MACRO] CLASS @typeCLASS FILE @typeFILE MYSQL @typeMYSQL MYSQLDATA @typeMYSQLDATA DLLSTRUCT @typeDLLSTRUCT OBJECT @typeOBJ SERVER @typeSERVER CLIENT @typeCLIENT GUIObject @typeGUIObject SOCKET @typeSOCKET STREAM @typeSTREAM FUNCTION @typeFUNC LINQ @typeLINQ CHARPTR @typeCHARPTR .NET Object @typeDOTNETOBJ ERROR @typeERR
Remarks
None.
Example
Checking using @ Macro of the numeric
$a = "My value"; if( GetVarObjType($a) == @typeCLIENT ) { } switch( GetVarObjType($a) ) { case @typeCLASS: { } break; case @typeMYSQLDATA: { } break; }