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 Tools . Books 1-3 - <b>fieldtype()</b> http://www.X-Hacker.org [<<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()

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