Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper 5.2 . The Guide To CA-Clippe - <b>valtype()</b> http://www.X-Hacker.org [<<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()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson