C5_VALTYPE

 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()



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.