[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
VALTYPE()
Determine the data type returned by an expression
------------------------------------------------------------------------------
Syntax
VALTYPE(<exp>) --> cType
Arguments
<exp> is an expression of any type.
Returns
VALTYPE() returns a single character representing the data type returned
by <exp>. VALTYPE() returns one of the following characters:
VALTYPE() Return Values
------------------------------------------------------------------------
Returns Meaning
------------------------------------------------------------------------
A Array
B Block
C Character
D Date
L Logical
M Memo
N Numeric
O Object
U NIL
------------------------------------------------------------------------
Description
VALTYPE() is a system function that takes a single argument, evaluates
it, and returns a one-character string describing the data type of the
return value. It is similar to TYPE(), but differs by actually
evaluating the specified argument and determining the type of the return
value. For this reason, you can determine the type of local and static
variables, user-defined functions, and EXTEND.LIB functions. TYPE(), by
contrast, uses the macro operator (&) to evaluate the type of its
argument. Note that if the argument does not exist, an error
("undefined error") will occur, unlike TYPE which will return "U."
Examples
. These examples show the return values for several data types:
? VALTYPE(1) // Result: N
? VALTYPE("GOOB") // Result: C
? VALTYPE(NIL) // Result: U
? VALTYPE(array) // Result: A
? VALTYPE(block) // Result: B
Files Library is CLIPPER.LIB.
See Also:
TYPE()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson