Xbasic
TYPEOF Function
Syntax
Result as C = TYPEOF(A value)
Arguments
- Result
The type of an expression. The possibilities are:
- "B" = blob
- "C" = character
- "D" = date
- "L" = logical
- "N" = numeric
- "P" = pointer
- value
An Xbasic expression. Any type
Description
Returns the data type of the value.
Discussion
TYPEOF() returns the type of an Expression.
Example
This script displays the type of a variable.
type = typeof(testVariable) ui_msg_box("Type","Type of variable is: " + type)
Beware that character strings that exceed 1,023 characters will be returned as blobs.
dim x as C ? typeof(x) = "C" x = replicate("x", 1024) ? typeof(x) = "B"
See Also