[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FIELDTYPE()
 Determines the data type for a field
------------------------------------------------------------------------------
 Syntax

     FIELDTYPE(<nField>) --> cType

 Argument

     <nField>  Designates the data field for which the data type is
     determined.

 Returns

     FIELDTYPE() returns a single character that designates the data type of
     the data field (assuming the data field number is valid).  FIELDTYPE()
     returns the following characters for the various data field types:

     Table 10-1: Coding for Data Field Types
     ------------------------------------------------------------------------
     Character    Data Type
     ------------------------------------------------------------------------
     C            Character string
     N            Numeric
     D            Date
     L            Logical
     M            MEMO
     ------------------------------------------------------------------------

 Description

     FIELDTYPE() operates in a similar fashion to the CA-Clipper TYPE()
     function.  With TYPE(), you must always know only the name of the data
     field.  However, FIELDTYPE() requires that you only know the data field,
     not its name.  Use the function to confirm data types for data fields
     when a program is working with different databases that have different
     field names.

 Note

     .  If there are  invalid data field numbers, the function returns
        a null string.

 Example

     Data type for field number 5:

     IF FIELDTYPE(5) = "C"
        ? "Field No. 5 is a character field!"
     ENDIF


See Also: FIELDSIZE() FIELDDECI()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson