VarType Function (Usual) | |
Returns the data type of an expression.
Note |
---|
VARTYPE( ) is similar to the TYPE( ) function, but VARTYPE( ) is faster and does not require quotation
marks to enclose the expression for which the data type is returned.
|
Namespace:
XSharp.VFP
Assembly:
XSharp.VFP (in XSharp.VFP.dll) Version: 2.19
Syntax FUNCTION VarType(
eExpression AS USUAL
) AS STRING
public static string VarType(
Usual eExpression
)
Request Example
View SourceParameters
- eExpression
- Type: Usual
Specifies the expression for which the data type is returned. VARTYPE( ) returns a single character
indicating the data type of the expression.
The table in the remarks section lists the characters that VARTYPE( ) returns for each data type.
Return Value
Type:
String
Character.
VARTYPE( ) returns a character representing the data type of the specified expression.
Remarks Return value | Data type |
---|
C | Character, Memo, Varchar, Varchar (Binary)
|
D | Date |
G | General |
L | Logical |
N | Numeric, Float, Double, or Integer |
O | Object |
Q | Blob, Varbinary |
T | DateTime |
U | Unknown or variable does not exist |
X | Null |
Y | Currency |
Note |
---|
If eExpression is an array, the first element in the array is evaluated. |
lNullDataTypeDescriptionTrue (.T.)Return data type for eExpression.False (.F.) or omittedReturn 'X' to indicate eExpression contains a null value.
See Also