Is (function): Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 46: | Line 46: | ||
== Related Items == | == Related Items == | ||
[[typename| | [[typename|TypeName]], [[vartype|VarType]] | ||
[[Category:Language Reference]] | [[Category:Language Reference]] | ||
Revision as of 01:12, 24 August 2012
IsArray(expression)
IsDate(expression)
IsEmpty(expression)
IsNull(expression)
IsNumeric(expression)
IsObject(expression)
Description
The Is functions return TRUE if a variable type corresponds to the function call, FALSE is returned otherwise. The required parameter, expression, is the variable whose type status is being determined.
Example
Rem Is Functions Example
Dim Children(3), Chef, When
TestVariable Children
Chef = 1
TestVariable Chef
When = Now
TestVariable When
Sub TestVariable(x)
If IsArray(x) Then
Print "The variable is an array."
ElseIf IsDate(x) Then
Print "The variable is a date."
ElseIf IsNumeric(x) Then
Print "The variable is a number."
End If
End Sub
Output
The variable is an array. The variable is a number. The variable is a date.