FT Database

 FT_DBFHAND()     Obtain the handle associated with an open .DBF file.
 FT_DBTHAND()     Obtain the handle associated with an open .DBT file.
 FT_FDEC()        Return the number of decimals in a numeric (type "N") field.
 FT_FEMPTY()      Determine if a field is empty, i.e., contains no value.
 FT_FEXIST()      Check for the existence of a field.
 FT_FLEN()        Return a field's length.
 FT_FNUM()        Return a field's ordinal position given the field name.
 FT_FPLACE()      Write a new value to a field.
 FT_FTYPE()       Return a field's type, given field name or ordinal position
 FT_FVAL()        Return the value of a field.
 FT_FVALLEN()     Return the length of the value in a field.
 FT_NTXHAND()     Obtain the handle associated with an open .NTX file.

 

FT_NTXHAND

FT_NTXHAND()
 Obtain the handle associated with an open .NTX file.

 Syntax

     FT_NTXHand( <nOrderNum> ) -> nHandle

 Arguments

    <nOrderNum> is a numeric value indicating the active index for which
    the handle is to be obtained.

 Returns

   The file handle, or zero if no .NTX is open in the specified
   work area or if <nOrderNum> does not represent an open index.

 Description

   For your own twisted reasons you may need make direct use of the
   file handle associated with an index.  This function gives you
   that capability, but use it with care and don't blame me if you
   botch something up.

   By default this function works on the current work area, but can be
   made to work on any work area through the use of the standard Clipper
   alias operator.

   Be aware that this function makes use of Clipper's internal work
   area information which is subject to change in future versions of
   Clipper.  If this makes you uncomfortable then don't use this function,
   you gutless weasel.

   This function is written to adhere to Turbo Assembler's IDEAL mode.
   To use another assembler, rearrange the SEGMENT and PROC directives
   and make any other necessary changes to the source code.

 Examples

     // Get the handle for the second index

     QOut( FT_NTXHand( 2 ) )

     // Try a non-current work area

     nHandle := THISFILE->( FT_NTXHand( 1 ) )

     // This will return zero because only 15 indexes can be active

     nHandle := THATFILE->( FT_NTXHand( 22 ) )

 Source: NTXHANDL.ASM

 Author: Ted Means

 

FT_FVALLEN

FT_FVALLEN()
 Return the length of the value in a field.

 Syntax

      FT_FVALLEN( <xVar> ) -> nVlen

 Arguments

      <xVar> is either a field name or ordinal .DBF position.

 Returns

      the length of the value in a specified field.  -1 if error.

 Description

      FT_FVALLEN() reports the length of the value in any .DBF field.

 Examples

      nVallen:= FT_FVALLEN("unit_prc")
      nVallen:= FT_FVALLEN( 2 )
      - or -
      nNum:=    FT_FNUM( "unit_prc" )
      nVallen:= FT_FVALLEN( nNum )

 Source: FIELD.PRG

See Also: FT_FPLACE() FT_FLEN() FT_FDEC() FT_FNUM() FT_FTYPE() FT_FVAL()

 

FT_FVAL

FT_FVAL()
 Return the value of a field.

 Syntax

       FT_FVAL( <xVar> ) -> xVal

 Arguments

     <xVar> is either a field name or ordinal .DBF position.

 Returns

     value (contents) of the specified field.  NIL, if error.

 Description

     FT_FVAL() reports the value (contents) of any .DBF field.

 Examples

     xVal:= FT_FVAL( "unit_prc" )
     xVal:= FT_FVAL( 2 )
     - or -
     nNum:= FT_FNUM( "unit_prc" )
     xVal:= FT_FVAL( nNum )

 Source: FIELD.PRG

See Also: FT_FPLACE() FT_FVALLEN() FT_FLEN() FT_FDEC() FT_FNUM() FT_FTYPE()

 

FT_FTYPE

FT_FTYPE()
 Return a field's type, given field name or ordinal position

 Syntax

      FT_FTYPE( <xVar> ) -> cType

 Arguments

     <xVar> is either a field name or ordinal .DBF position.

 Returns

     the type of field: character (C), numeric (N), date (D), logical (L),
     or memo (M).  "U", if NIL.

 Description

     FT_FTYPE() reports the type ("C","N","D","L","M") of any .DBF field.

 Examples

     cType:= FT_FTYPE( "unit_prc" )
     cType:= FT_FTYPE( 2 )
     - or -
     nNum:=  FT_FNUM( "unit_prc" )
     cType:= FT_FTYPE( nNum )

 Source: FIELD.PRG

See Also: FT_FPLACE() FT_FVALLEN() FT_FLEN() FT_FDEC() FT_FNUM() FT_FVAL()

 

FT_FPLACE

FT_FPLACE()
 Write a new value to a field.

 Syntax

      FT_FPLACE( <xVar>, <xVal> ) -> xVal

 Arguments

     <xVar> is either a field name or ordinal .DBF position.

 Returns

     <xVal>, the FT_FPLACE()d value.  NIL if error.

 Description

     FT_FPLACE() writes a new value to a specified field of *ANY*
     Clipper-valid type.  In conjunction with the FIELDPLACE UDC
     (in FT_FIELD.CH), it constitutes a fully capable alternative to
     REPLACE.

 Examples

     xVal:= FT_FPLACE( "unit_prc", 15.73 )
     xVal:= FT_FPLACE( 2, 15.73 )
     - or -
     nNum:= FT_FNUM( "unit_prc" )
     xVal:= FT_FPLACE( nNum,15.73 )

 Source: FIELD.PRG

See Also: FT_FVALLEN() FT_FLEN() FT_FDEC() FT_FNUM() FT_FTYPE() FT_FVAL()



FT_FNUM

FT_FNUM()
 Return a field's ordinal position given the field name.

 Syntax

      FT_FNUM( <cVar> ) -> nNum

 Arguments

     <cVar> must be a valid field name.

 Returns

     the ordinal position of the field.  0, if a non-character value is
     passed or field <xVar> does not exist.

 Description

     In 5.01, FT_FNUM() was superseded by FieldPos().  Included here for
     those who already coded FT_FNUM() calls.

 Examples

     nNum:= FT_FNUM( "unit_prc" )

 Source: FIELD.PRG

See Also: FT_FPLACE() FT_FVALLEN() FT_FLEN() FT_FDEC() FT_FTYPE() FT_FVAL()



FT_FLEN

FT_FLEN()
 Return a field's length.

 Syntax

      FT_FLEN( <xVar> ) -> nLen

 Arguments

     <xVar> is either a field name or ordinal .DBF position.

 Returns

     the length of the specified field.  -1 if error.

 Description

     FT_FLEN() reports the length of any .DBF field.

 Examples

     nLen:= FT_FLEN("unit_prc")
     nLen:= FT_FLEN( 2 )
     - or -
     nNum:= FT_FNUM( "unit_prc" )
     nLen:= FT_FLEN( nNum )

 Source: FIELD.PRG

See Also: FT_FPLACE() FT_FVALLEN() FT_FDEC() FT_FNUM() FT_FTYPE() FT_FVAL()



FT_FEXIST

FT_FEXIST()
 Check for the existence of a field.

 Syntax

      FT_FEXIST( <xVar>, <xVal> ) -> lVal

 Arguments

     <xVar> may be either a field name or ordinal .DBF position.

 Returns

     <lVal>, a logical indicating a field's existence or lack thereof.

 Description

     FT_FEXIST() enables existence checking before proceeding with
     other operations.

 Examples

     lExi:= FT_FEXIST( "unit_prc" )
     lExi:= FT_FEXIST( 2 )
     - or -
     nNum:= FT_FNUM( "unit_prc" )
     lExi:= FT_FEXIST( nNum )

 Source: FIELD.PRG

See Also: FT_FVALLEN() FT_FLEN() FT_FDEC() FT_FNUM() FT_FTYPE() FT_FVAL()

 

FT_FEMPTY

FT_FEMPTY()
 Determine if a field is empty, i.e., contains no value.

 Syntax

      FT_FEMPTY( <xVar> ) -> lVal

 Arguments

     <xVar> may be either a field name or ordinal .DBF position.

 Returns

     <lVal>, a logical indicating if field <xVar> is empty.

 Description

     FT_FEMPTY() checks for the existence of a value in a field.

 Examples

     lEmp:= FT_FEMPTY( "unit_prc" )
     lEmp:= FT_FEMPTY( 2 )
     - or -
     nNum:= FT_FNUM( "unit_prc" )
     lEmp:= FT_FEMPTY( nNum )

 Source: FIELD.PRG