home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 2 / ctrom_ii_b.zip / ctrom_ii_b / PROGRAM / FOXPRO / TABLES / TBLSRC / TBLFIELD.PRG < prev    next >
Text File  |  1992-11-13  |  2KB  |  64 lines

  1. * Program   :TblField.prg
  2. * Author    :Mark D. Miller
  3. * Date      :12-Nov-1992
  4. * Notice    : Copyright (c) 12-Nov-1992 by Mark D. Miller
  5. *             All Rights Reserved.
  6. * Notes     :This is the get filter for the Field table routines
  7. *
  8. * The includes
  9. *
  10. #INCLUDE TABLE.HDR
  11. #INCLUDE IO.HDR
  12. #INCLUDE KEYS.HDR
  13. #INCLUDE STRING.HDR
  14. *
  15. * Global Table Memory
  16. *
  17. VARDEF  EXTERN
  18.     CHAR( 12 )  OpenTableName
  19.     FILE        OpenTableHandle
  20.     UINT        TableCnt, TableCnt2, TableKy
  21.     LONG        DataList, KeyList
  22.     INT         TableType
  23.     INT         TableIdx
  24. ENDDEF
  25. **********************************************************************
  26. *                   T H E    R O U T I N E S                         *
  27. **********************************************************************
  28. * Function  :Table
  29. * Date      :03-Aug-1992
  30. * Parameters:name           Name of table
  31. *           :TableRow       Row field is on
  32. *           :TableCol       Col field is on
  33. *           :length         Max Length of table strings
  34. *           :pkey           Key into PickList
  35. *           :
  36. * Return Val:TableKy        Key pressed
  37. *           :
  38. * Notes     :This routine opens the correct table file and calls VerifyTable
  39. *
  40. FUNCTION UINT Table
  41.     PARAMETERS  CONST   CHAR( 8 )   name,;
  42.                 const   UINT        TableRow,;
  43.                 const   UINT        TableCol,;
  44.                 const   INT         length,;
  45.                         CHAR( 4 )   pkey
  46.  
  47.     TableKy = LASTKEY()
  48.     IF TableKy <> &K_TAB
  49.         RETURN TableKy
  50.     ENDIF
  51.     *
  52.     * Init the table if not already
  53.     *
  54.     IF AT( Name, OpenTableName ) = 0
  55.         IF .NOT. InitTable( Name )
  56.             RETURN 0
  57.         ENDIF
  58.     ENDIF
  59.     VerifyTable( Name, TableRow, TableCol, length, pkey )
  60.     RETURN &K_HOME
  61. ENDPRO
  62.  
  63. *  EOF : TblField.prg
  64.