home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l391 / 3.ddi / BOOKLOOK.BI$ / BOOKLOOK.bin
Encoding:
Text File  |  1992-08-19  |  2.2 KB  |  70 lines

  1. ' Procedure declarations and type structure definitions
  2. ' for BookLook ISAM demo.
  3. '
  4.  
  5. ' Procedure declarations.
  6. DECLARE SUB DisplayRecord ()
  7. DECLARE SUB SaveRecord ()
  8. DECLARE SUB KeyHandle (KeyCode AS INTEGER)
  9. DECLARE SUB OpenFile ()
  10.  
  11. ' General constants.
  12. CONST FALSE = 0
  13. CONST TRUE = NOT FALSE
  14.  
  15. ' Constants for the database table names.
  16. CONST cBookStockTableNum = 1
  17. CONST cCardHoldersTableNum = 2
  18. CONST cBooksOutTableNum = 3
  19.  
  20. ' Structure corresponding to BooksOut table.
  21. TYPE BookStatus
  22.   IDnum     AS DOUBLE
  23.   CardNum   AS LONG
  24.   DueDate   AS DOUBLE
  25. END TYPE
  26.  
  27. ' Structure corresponding to CardHolders table.
  28. TYPE Borrowers
  29.   CardNum         AS LONG
  30.   Zip             AS LONG
  31.   TheName         AS STRING * 36
  32.   City            AS STRING * 26
  33.   Street          AS STRING * 50
  34.   State           AS STRING * 2
  35. END TYPE
  36.  
  37. ' Structure corresponding to BookStock table.
  38. TYPE Books
  39.   IDnum     AS DOUBLE
  40.   Price     AS CURRENCY
  41.   Edition   AS INTEGER
  42.   Title     AS STRING * 50
  43.   Publisher AS STRING * 50
  44.   Author    AS STRING * 36
  45. END TYPE
  46.  
  47. TYPE RecStruct                  ' This structure contains each of the other
  48.   TableNum    AS INTEGER        ' other table structures. When you pass a
  49.   WhichIndex  AS STRING * 40    ' reference to this structure to procedures
  50.   Inventory   AS Books          ' the procedure decodes the TableNum
  51.   Lendee      AS Borrowers      ' element, then deals with the proper table.
  52.   OutBooks    AS BookStatus     ' WhichIndex is used to communicate the index
  53. END TYPE                        ' the user wants to set.
  54.  
  55. ' Common variables.
  56. COMMON SHARED /booklook/ BigRec AS RecStruct    ' User-defined type structures corresponding
  57.                                                 ' to ISAM tables.  Used to access record information.
  58. COMMON SHARED /booklook/ TempRec AS RecStruct   ' Temporary record used to compare against BigReg
  59.  
  60. COMMON SHARED /booklook/ CardRecordChanged AS INTEGER ' Tracks CardHolder record changes.
  61. COMMON SHARED /booklook/ BookRecordChanged AS INTEGER ' Tracks BookStock record changes.
  62.  
  63. ' Application forms.
  64. '$FORM frmList
  65. '$FORM frmSearch
  66. '$FORM frmCardHolder
  67. '$FORM frmBookStock
  68. '$FORM frmBooklook
  69.  
  70.