Core Function GetVarObjType
From Sputnik Wiki
(Difference between revisions)
(→Return Value) |
|||
(11 intermediate revisions by one user not shown) | |||
Line 17: | Line 17: | ||
Returns the common object type a variable as a numeric value types are: | Returns the common object type a variable as a numeric value types are: | ||
<pre> | <pre> | ||
− | + | [TYPE] [@MACRO] | |
− | + | CLASS @typeCLASS | |
− | + | FILE @typeFILE | |
− | + | MYSQL @typeMYSQL | |
− | + | MYSQLDATA @typeMYSQLDATA | |
− | + | DLLSTRUCT @typeDLLSTRUCT | |
− | + | OBJECT @typeOBJ | |
− | + | SERVER @typeSERVER | |
− | + | CLIENT @typeCLIENT | |
− | + | GUIObject @typeGUIObject | |
− | + | SOCKET @typeSOCKET | |
− | + | FUNCTION @typeFUNC | |
− | + | LINQ @typeLINQ | |
− | + | ERROR @typeERR | |
− | + | ||
− | + | ||
</pre> | </pre> | ||
Line 40: | Line 38: | ||
=== Example === | === Example === | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Checking using @ Macro of the numeric | Checking using @ Macro of the numeric |
Latest revision as of 19:16, 18 September 2015
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 FUNCTION @typeFUNC LINQ @typeLINQ 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; }