home *** CD-ROM | disk | FTP | other *** search
/ Eagles Nest BBS 8 / Eagles_Nest_Mac_Collection_Disc_8.TOAST / Developer Environments / TurPasDBTlbx / TP-Database Toolbox / Turbo Access / SetConst.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1987-12-11  |  2.1 KB  |  58 lines  |  [TEXT/TPAS]

  1. (*********************************************************************)
  2. (*                  Turbo Pascal Database Toolbox                    *)
  3. (*                       For the Macintosh                           *)
  4. (*            Copyright (C) 1987 Borland International               *)
  5. (*                     Toolbox version: 1.0                          *)
  6. (*                                                                   *)
  7. (*          SetConst - Turbo Access Configuration Program            *)
  8. (*                                                                   *)
  9. (*   Purpose: Customizes the Turbo Access unit for a particular      *)
  10. (*            Database (record and key(s)) structure.  Also Allows   *)
  11. (*            programmer to control the memory requirements vs.      *)
  12. (*            retrieval speed of the Turbo Access system.            *)
  13. (*                                                                   *)
  14. (*********************************************************************)
  15. program SetConst;
  16. {$R SetConst.rsrc} 
  17. {$U-}
  18. {$U ConstUser}
  19. uses MemTypes, QuickDraw, OSIntf, ToolIntf, 
  20.      PackIntF, PasInOut, ConstUser;
  21.      
  22. {$I    .types }
  23. {    ^^ Include file with your type declarations }
  24. { for MaxDataType and MaxKeyType } 
  25.  
  26. procedure SetUserDefaults;
  27. { Uses the type definitions for MaxDataType and MaxKeyType
  28.   to set MaxDataRecSize and MaxKeyLen. }
  29. begin
  30.   DefaultMaxRecSize := SizeOf(MaxDataType);
  31.     { Set to record definition type ^^ }
  32.   DefaultMaxKey := SizeOf(MaxKeyType) - 1;
  33.     { Set to key definition type ^^ } 
  34.     
  35.   MaxMemory := MaxInt div 2;
  36.   { Maximum size of Page Stack used to calculate defaults. }
  37.   { You can set this value as high as to 32K i.e. MaxInt.  }
  38.  
  39.   AlwaysUseDefaults := false;
  40.   { If you want to always use the defaults set boolean to true. }
  41.   ShowCompileInfo := true;
  42.   { Set to false if you do not need Turbo Access Compilation directions. } 
  43.   
  44. end; { SetUserDefaults }
  45.  
  46.  
  47. begin
  48.   SetUserDefaults;
  49.   InitSetConst;
  50.   if not AlwaysUseDefaults then
  51.     if not UseDefaults then
  52.     begin
  53.       InitWorkSheet;
  54.       SetConstants;
  55.     end;
  56.   FinishUp;
  57. end.
  58.