home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-02-22 | 29.9 KB | 1,538 lines |
-
- (***********************************)
- (* TPDB *)
- (* Turbo Pascal Tools for dBASE *)
- (* *)
- (* Turbo Pascal 5.0 Unit *)
- (* for Accessing dBASE III *)
- (* files. *)
- (* *)
- (* Copyright 1989 *)
- (* Brian Corll *)
- (* and Ten B.C. Micro Systems *)
- (* All Rights Reserved *)
- (* dBASE, dBASE III, and dBASE *)
- (* III Plus are registered *)
- (* trademarks of Ashton-Tate Corp. *)
- (* *)
- (* Turbo Pascal is a registered *)
- (* trademark of Borland Int. Corp.*)
- (* *)
- (* Version 2.0 February 22, 1989 *)
- (* *)
- (***********************************)
- (* Portions copyright 1984,1988 by *)
- (* Borland International Corp. *)
- (***********************************)
-
-
- TPDB is a toolbox of Turbo Pascal 5.0 units which allow
- you to access, index, search, read and write database
- files that were created with dBASE III or III Plus,
- using 75 Turbo Pascal procedures and functions written
- specifically for these purposes. At present, it supports
- only a single .DBF and an associated index (it's own
- brand ofindexes, NOT indexes created by dBASE). You can,
- however, successively open any number of .DBF and .NDX
- files. Index keys can be up to 254 characters, and can
- be composed of multiple fields or expressions which
- evaluate to a string not longer than 254 characters.
- Future plans include support for multiple indexes , as
- well as multiple .DBF files open concurrently.
-
- All field types are supported except memo fields.
-
- Questions/comments can be left for me on the InterLink
- or FidoNet Pascal or dBASE conferences. More complete
- responses can be had by using InterLink for messages, as
- I then don't have to read messages on line.
-
- This program is being distributed under the Shareware
- concept.
-
- If you like this program and use it, a registration fee
- of $10 is required for non-profit users. Commercial
- users MUST register for a one-time, royalty-free
- registration fee of $15. Registered users will be
- entitled to upgrades for a fee of $5 per upgrade, to
- cover shipping and handling costs. See the file
- REGISTER.FRM.
-
-
- NOTA BENE:
- This registration fee is intended to cover my personal
- time and expense in developing, documenting, and
- distributing this toolbox, and does not constitute the
- sale of the code contained therein.
-
-
- Write to:
-
- Ten B.C. Micro Systems
- Brian Corll
- 102 West Locust Street
- Mechanicsburg,PA 17055
- Home : 717-691-0286 Eves. and Weekends
-
- DISCLAIMER
-
- This program is provided "as is" without warranty of any
- kind, either express or implied, included but not
- limited to the implied warranty of merchantability and
- fitness for a specific purpose. The entire risk as to
- the quality and performance of this program is with you.
-
- In no event will the author be liable to you for any
- damages, including any lost profits, lost savings or
- other incidental or consequential damages arising out of
- the use of or inability to use this program.
-
- NOTE
-
- Source code is included as TPDB.pas,TPDBDate.pas,
- Flash.asm, and TPDB.asm. Source code for TPDBIndx.tpu
- will not be released at any time as it consists of
- custom revisions to commercial source which, despite
- heavy rewriting on my part, cannot be released without
- violating the rights of the copyright holder.
-
- CREDITS
-
- Some of the routines in this toolbox are based on public
- domain Pascal and Assembler code by Juan Vegarra, Brian
- Foley, David Bennett, Scott Bussinger, and John Wood. My
- thanks to them all for laying some of the foundations.
-
-
-
- (***************************************************)
- (* Globals in TPDB.tpu *)
- (***************************************************)
-
- The globals in this TPU use up only 860 bytes of the
- data segment !
-
-
- Const
-
- CursorLeft = ^S;
- CursorRight = ^D;
- CursorDown = ^X;
- CursorUp = ^E;
- CursorHome = ^A;
- CursorEnd = ^F;
- PageUp = ^R;
- PageDown = ^C;
- DelKey = ^G;
- TabKey = #9;
- Return = ^M;
- Escape = ^[;
- UpperCase : Boolean = False;
-
- NoDuplicates = 0;
- Duplicates = 1;
- MaxReal = 3.4E37;
- MinReal = 1.5E-45;
- MaxLong = 2147483647;
- MinLong = -2147483647;
-
- The following are color constants to be used with Normal
- and Reverse to set display and edit colors, using Turbo
- Pascal's constant folding capabilities.
-
- e.g. to display fields in white on a blue background you
- would set Normal := White+BlueBG; to edit in black on a
- white background you set Reverse := Black+LightGrayBG.
-
- Black = $00; DarkGray = $08;
- Blue = $01; LightBlue = $09;
- Green = $02; LightGreen = $0A;
- Cyan = $03; LighBCyan = $0B;
- Red = $04; LightRed = $0C;
- Magenta = $05; LightMagenta = $0D;
- Brown = $06; Yellow = $0E;
- LightGray = $07; White = $0F;
- Blink = $80;
-
- BlackBG = $00;
- BlueBG = $10;
- GreenBG = $20;
- CyanBG = $30;
- RedBG = $40;
- MagentaBG = $50;
- BrownBG = $60;
- LightGrayBG = $70;
-
-
- Type
-
- Str2 = String[2];
- Str4 = String[4];
- Str5 = String[5];
- Str6 = String[6];
- Str8 = String[8];
- Str10 = String[10];
- Str15 = String[15];
- Str20 = String[20];
- Str30 = String[30];
- Str60 = String[60];
- Str80 = String[80];
- Str132 = String[132];
- CharSet = Set of Char;
- ByteSet = Set of Byte;
-
- FileName = String[66];
- DBRecPtr = ^DBType;
- DBType = Array[1..4000] of Char;
- DBKey = String[254];
-
- DBHeader = Record
- DBType : Byte;
- Year : Byte;
- Month : Byte;
- Day : Byte;
- RecCount : LongInt;
- Location : Integer;
- RecordLen : Integer;
- Reserved : Array[1..20] of Byte;
- Terminator : Char;
- end;
-
- DBField = Record
- FieldName : Array[1..11] of Char;
- FieldType : Byte;
- FieldAddress : LongInt;
- FieldLen : Byte;
- FieldDec : Byte;
- Reserved : Array[1..14] of Char;
- end;
-
- HeadPtr = ^DBHeader;
- PosPtr = ^DBEditArray;
- FieldPtr = ^FieldArray;
- DBEditArray = Array[1..2,1..128] of Integer;
- FieldArray = Array[1..128] of DBField;
-
-
- Const
-
- Up : CharSet = [CursorUp];
- Down : CharSet = [CursorDown,Return];
- Next : CharSet = [Escape];
-
-
-
- Var
- Normal : Byte;
- Reverse : Byte;
- UCKey,IndOpen,
- DBFOpen : Boolean;
- DBFileName : FileName;
- DBFile,TempFile : File;
- Header : HeadPtr;
- Fields : FieldPtr;
- Message : String[80];
- Positions : PosPtr;
- DBRecord : DBRecPtr;
- NumFields,ErrCode : Integer;
- BC,Ch : Char;
- TotalRecs,DBRecNum,
- : LongInt;
- Y,M,D,DW : Word;
- NumLen,Decimals,
- LL,K : Byte;
- DBIndex : IndexFile;
- DBIndexName : FileName;
- Found : Boolean;
- Start,Stop : Integer;
-
-
- (************************************************************)
- (* Documentation for Procedures and Functions in TPDB.tpu *)
- (************************************************************)
-
- Add function
-
- Function
-
- Adds two numeric fields
-
- Declaration
-
- Add(Field1,Field2 : Byte):string;
-
- Remarks
-
- Field1 and Field2 are the order numbers of the
- respective fields as they appear in the .DBF
- structure.
-
- *************************
-
- AddDBKey procedure
-
- Function
- Adds a key string to the index currently in use.
-
- Declaration
- AddDBKey(KeyStr : DBKey);
-
- Remarks
-
- KeyStr is any string not longer than 254
- characters. A field must be converted to a string
- by using the FieldToStr function (q.v.).
-
- Restrictions
-
- Length(KeyStr) must be in the range of 1..254
- characters. All expression must evaluate to a
- single string not more than 254 characters in
- length.
-
-
- *************************
-
- AddDBRec procedure
-
- Function
-
- Adds a new record to the .DBF file in use.
-
- Declaration
-
- AddDBRec;
-
- Remarks
-
- A new record must first be created with a call to the
- NewDBRec procedure.
-
- ************************
-
- BlockCursor procedure
-
- Function
-
- Turns on a block cursor.
-
- Declaration
-
- BlockCursor;
-
- ************************
-
- BOF function
-
- Function
-
- Returns beginning of file status of a .DBF file.
-
- Declaration
-
- BOF
-
- Result Type
-
- Boolean
-
-
-
- ************************
-
- BuildIndex procedure
-
- Due to a change in the indexing procedures from
- version 1.3, this procedure is no longer
- implemented in TPDB.tpu. It may be replaced as
- follows:
-
- Var
-
- J : LongInt;
-
- For J := 1 to TotalRecs do
- begin
-
- GetDBRec(J);
- AddDBKey(Key Expression);
- end;
-
- "Key Expression" is any key string not longer
- than 254 characters. For example, two fields
- could be concatenated :
-
-
- AddDBKey(RTrim(LTrim(Upper(FieldToStr(1))))+;
- RTrim(LTrim(Upper(FieldToStr(2)))));
-
- Here, fields one and two are trimmed of leading and
- trailing blanks and then converted to upper case before
- being concatenated and passed to the indexing routines
- as a single string. See documentation for AddDBKey
- procedure.
-
- ************************
-
- CalcDate function
-
- Function
-
- Add or subtract days,months, or years from two dates.
-
- Declaration
-
- CalcDate(InDate:DateStr;Days,Months,Years:
- integer): DateStr;
-
- *************************
-
- CDOW function
-
- Function
-
- Returns character day of week - i.e.
- 'Monday','Tuesday',etc.
-
- Declaration
-
- CDOW(InDate : DateStr): DayStr;
-
- *************************
-
- CMonth function
-
- Function
-
- Returns character month - i.e. 'March'
-
- Declaration
-
- CMonth(InDate : DateStr) : Str9;
-
- *************************
-
- CheckScreen procedure
-
- Function
-
- Checks the current field being edited against
- minimum and maximum limits of fields displayed.
-
- Declaration
-
- CheckScreen(Var CurrPos:Byte;BC:Char;Up,Down:CharSet;
- Low,High:Byte);
-
- Remarks
-
- CurrPos is the number of the field currently being
- edited in the editing loop (see DEMO.pas for an
- example).
-
- BC is the terminating character when field editing
- has been completed.
-
- Up and Down are the character sets which contain
- the terminating characters which allow you to move
- from one field to another, up or down. In TPDB,
- they are declred as constants, as follows:
-
- Up : CharSet = [CursorUp];
- Down : CharSet = [CursorDown,Return];
-
- I first saw this concept used by Juan Vegarra in
- his DER.pas data entry routines.
-
- Low and High are the low and high numbers of the
- displayed fields.
-
- ************************
-
- CloseDBFile procedure
-
- Function
-
- Closes the currently open .DBF file.
-
- Declaration
-
- CloseDBFile;
-
- Remarks
-
- This procedure is error-checked.
-
- ************************
-
- CloseDBIndex procedure
-
- Function
-
- Closes the index currently in use.
-
- Declaration
-
- CloseDBIndex;
-
- Remarks
-
- This procedure is error-checked.
-
- ************************
-
- CompDates function
-
- Function
-
- Compares two dates and calculates the number of
- days between them.
-
- Declaration
-
- CompDates(Date1,Date2 : DateStr):Word;
-
- *************************
-
- CTOD function
-
- Function
-
- Converts a .DBF compatible date field to a word
- date type for date arithmetic.
-
- Declaration
-
- CTOD(InDate: DateStr) : DateType;
-
- *************************
-
- CursorOn and CursorOff procedures
-
- Function
-
- Turn cursor on and off
-
- Declaration
-
- CursorOn;
- CursorOff;
-
- Externally declared in Flash.obj.
-
- *************************
-
- DBOpenFile procedure
-
- Function
-
- Opens a .DBF file.
-
- Declaration
-
- DBOpenFile(DBName : FileName);
-
- Remarks
-
- FileName can be up to 66 chars long and can
- contain the full path.
-
- This procedure is error-checked.
-
- ************************
-
- DBReset procedure
-
- Function
-
- Resets a .DBF file, moving the file pointer to
- record 1.
-
- Declaration
-
- DBReset;
-
- Remarks
-
- This procedure is error-checked.
-
- ************************
-
- DelDBKey procedure
-
- Function
-
- Deletes a key string in the index currently in use.
-
- Declaration
-
- DelDBKey(KeyStr : DBKey);
-
- Remarks
-
- See documentation for AddDBKey procedure.
-
-
-
- *************************
-
-
- Deleted function
-
- Function
-
- Returns True if the curent record has been marked
- for deletion, False if it has not been marked.
-
- Declaration
-
- Deleted : boolean;
-
-
- ************************
-
- Display procedure
-
- Function
-
- Displays the current record in a partially
- formatted manner.
-
- Declaration
-
- Display;
-
- Remarks
-
- Date fields are formatted as MM/DD/YY.
-
- *************************
-
- Divide function
-
- Function
-
- Divides field1 BY field2
-
- Declaration
-
- Divide(Field1,Field2 : Byte):string;
-
- Remarks
-
- Field1 and Field2 are the order numbers of the
- respective fields as they appear in the .DBF
- structure.
-
- *************************
-
- DTOC function
-
- Function
-
- Converts a word date type to a string compatible
- with .DBF date fields.
-
- Declaration
-
- DTOC(Julian: DateType) : DateStr;
-
- *************************
-
- EOF function
-
- Function
-
- Returns end-of-file status of a .DBF file.
-
- Declaration
-
- EOF
-
- Return Type
-
- Boolean
-
- ************************
-
- FieldToStr function
-
- Functions
-
- Returns a string read from a specified field in a
- specified record in a .DBF file.
-
- Declaration
-
- FieldToStr(FieldNumber : Byte) : string;
-
- Remarks
-
- FieldNumber is the number of the field in the .DBF
- file structure. Date fields are not formatted.
-
- ************************
-
- FillRecs procedure
-
- Function
-
- Appends a specified number of blank records to a
- .DBF file.
-
- Declaration
-
- FillRecs(NumRecs : LongInt);
-
- ************************
-
- Find procedure
-
- Function
-
- Searches for a string in the currently open index.
-
- Declaration
-
- Find(SearchStr : String);
-
- Remarks
-
- If the string is found, a value of True is
- returned in the global boolean variable Found. If
- the string is not found, a value of False is
- returned in Found.
-
- ************************
-
- Flash procedure
-
- Function
-
- Writes a string at a specified row and column,
- using a specified attribute, by direct video
- access.
-
- Declaration
-
- Flash(Row,Col, Attr:byte; Str : String);
-
- Remarks
-
- When setting attribute, constant folding can be
- used. See color constants in globals section.
-
- ************************
-
- FlashC procedure
-
- Function
-
- Writes a centered string at a specified row, using
- a specified attribute, by direct video access.
-
- Declaration
-
- FlashC(Row,Attr:Byte;Str : String);
-
- Remarks
-
- See remarks for Flash procedure.
-
- ************************
-
- FlashFill procedure
-
- Function
-
- Fills a specified screen block with a specified
- character and attribute.
-
- Declaration
-
- FlashFill(Row,Col,Rows,Cols,Attr : Byte;Ch :
- Char);
-
- Remarks
-
- See remarks for other Flash procedures.
-
- ************************
-
-
- FlushDB procedure
-
- Function
-
- Flushes records currently in memory to disk file.
-
- Declaration
-
- FlushDB;
-
- Remarks
-
- This procedure is error-checked.
-
-
- ************************
-
- FormDate function
-
- Function
-
- Formats a date string as stored in a .DBF file in
- the 'MM/DD/YY' format.
-
- Declaration
-
- FormDate(InDate:DateStr):String;
-
- *************************
-
- Get procedure
-
- Function
-
- Edits a specified field in the .DBF at a specified
- row and column.
-
- Declaration
-
- Get(FieldNumber,Row,Col : Byte);
-
- Remarks
-
- The following editing keys are active:
-
- Left cursor
- Right Cursor
- Home
- End
- Ctrl-Y (Deletes the entire field.)
-
-
- ************************
-
- GetDBRec procedure
-
- Function
-
- Locates and reads a specified record in a .DBF
- file.
-
- Declaration
-
- GetDBRec(RecordNumber : LongInt);
-
- ************************
-
-
- GetString procedure
-
- Function
-
- Allows screen input of a string, as in a search
- procedure.
-
- Declaration
-
- GetString(Var Parameter : String; Length, Row, Col
- : Byte) : Char;
-
- ************************
-
- GoBottom procedure
-
- Function
-
- Set the file pointer at the end of file.
-
- Declaration
-
- GoBottom;
-
- ************************
-
- GoTop procedure
-
- Function
-
- Sets the file pointer at the beginning of file.
-
- Declaration
-
- GoTop;
-
- ************************
-
-
- IIF function
-
- Function
-
- Evaluates a boolean variable and returns a string
- according to the value of the boolean.
-
- Declaration
-
- IIF(BoolVar : Boolean;IfTrue,IfFalse : String) :
- String;
-
- ************************
-
-
- JustL function
-
- Function
-
- Left justifies a string within a specified field
- length.
-
- Declaration
-
- JustL(InString: String; FieldLen: Integer): String;
-
- ************************
-
- LTrim function
-
- Function
-
- Trims leading spaces from a string.
-
- Declaration
-
- LTrim(InStr: String): String;
-
- *************************
-
-
- Lower function
-
- Function
-
- Converts a string to lower case.
-
- Declaration
-
- Lower(InStr: String): String;
- Externally declared in Flash.obj.
-
- *************************
-
- MakeDBIndex procedure
-
- Function
-
- Creates a new index file but does not build it.
-
- Declaration
-
- MakeDBIndex(DBIndexName : FileName;KeyLen,Status :
- Integer);
-
- Remarks
-
- DBIndexName can be a maximum of 66 chars in length
- and is the full path and name of the index file to
- be created. the key field.
-
- KeyLen is the length of the key field. Number are
- stored as strings in .DBF files, and can thus be
- used as keys without conversion.
-
- Status is defined as one of two constants:
- NoDuplicates, or Duplicates, according to whether
- or not duplicate keys will be allowed in the
- index.
-
-
- ************************
-
- Mark procedure
-
- Function
-
- Marks the current record for deletion.
-
- Declaration
-
- Mark;
-
-
- ************************
-
- Max function
-
- Function
-
- Determines the maximum of two integers
-
- Declaration
-
- Max(N1,N2 : Integer) : Integer;
-
- *************************
-
- Min function
-
- Function
-
- Determines the minimum of two integers
-
- Declaration
-
- Min(N1,N2 : Integer) : Integer;
-
- *************************
-
- Mon function
-
- Function
-
- Returns numeric value for the month in a date.
-
- Declaration
-
- Mon(InDate : DateStr) : Byte;
-
- *************************
-
- Mul function
-
- Function
-
- Multiplies two numeric fields.
-
- Declaration
-
- Mul(Field1,Field2 : Byte):string;
-
- Remarks
-
- Field1 and Field2 are the order numbers of the
- respective fields as they appear in the .DBF
- structure.
-
- *************************
-
- NewDBRec procedure
-
- Function
-
- Creates a new blank record in memory, ready for
- editing.
-
- Declaration
-
- NewDBRec;
-
- ************************
-
- NextDBKey procedure
-
- Function
-
- Moves file record pointer to the record number
- associated with the next key in an index.
-
- Declaration
-
- NextDBKey(KeyStr : DBKey);
-
- Remarks
-
- See documentation for AddDBKey procedure.
-
-
- ************************
-
- NextRec procedure
-
- Function
-
- Moves the file pointer to the next sequential
- record in the file.
-
- Declaration
-
- NextRec;
-
- ************************
-
- OpenDBIndex procedure
-
- Function
-
- Opens an index for search and updating.
-
- Declaration
-
- OpenDBIndex(DBIndexName : FileName;KeyLen,Status :
- Integer);
-
- Remarks
-
- DBIndexName can be a maximum of 66 chars in length
- and is the full path and name of the index file to
- be created. the key field.
-
- KeyLen is the length of the key field. Number are
- stored as strings in .DBF files, and can thus be
- used as keys without conversion.
-
- Status is defined as one of two constants:
- NoDuplicates, or Duplicates, according to whether
- or not duplicate keys will be allowed in the
- index.
-
-
- ************************
-
- Pack procedure
-
- Function
-
- Packs a .DBF files, removing records marked for
- deletion.
-
- Declaration
-
- Pack;
-
- ************************
-
- PadL function
-
- Function
-
- Pads a string with spaces on the left, to a
- specified field length.
-
- Declaration
-
- PadL(InStr: String; FieldLength: Integer): String;
-
- ************************
-
- PadR function
-
- Function
-
- Pads a string with spaces on the right, to a
- specified field length.
-
- Declaration
-
- PadR(InStr: String; FieldLength: Integer): String;
-
-
- ************************
-
- PrevDBKey procedure
-
- Function
-
- Moves file pointer to the record number
- corresponding to the previous key in an index.
-
- Declaration
-
- PrevDBKey(KeyStr : DBKey);
-
- Remarks
-
- See documentation for AddDBKey procedure.
-
-
- ************************
-
- PrevRec procedure
-
- Function
-
- Moves the file pointer to the previous sequemtial
- record in the file.
-
- Declaration
-
- PrevRec;
-
- ************************
-
- Prompt procedure
-
- Function
-
- Displays a prompt string at a specified row an
- column, using direct video writes.
-
- Declaration
-
- Prompt(Row,Col : Byte;PromptStr : Str80);
-
- ************************
-
- PutDBRec procedure
-
- Function
-
- Writes the current editing record to a specified
- record number in the .DBF file.
-
- Declaration
-
- PutDBRec(RecordNumber : LongInt);
-
- Remarks
-
- Be sure that the specified record number is the
- same as the one given in the call to GetDBRec.
-
- ************************
-
-
- ReadDBHeader procedure
-
- Function
-
- Reads the file header of a .DBF file into a
- buffer.
-
- Declaration
-
- ReadDBHeader;
-
- ************************
-
- Recall procedure
-
- Function
-
- Unmarks a record previously marked for deletion.
-
- Declaration
-
- Recall;
-
- ************************
-
- Repl procedure
-
- Function
-
- Replaces a specified field in a record with a
- specified string.
-
- Declaration
-
- Repl(FieldNumber : Byte;ReplStr : string);
-
- Remarks
-
- FieldNumber is the number of the field in the .DBF
- file structure. ReplStr is the string with which
- the field is to be replaced. When replacing date
- fields, remember that the date string must be in
- the form "19890214".
-
- ************************
-
- ReplEach procedure
-
- Function
-
- Replaces a specified field in each record in a
- .DBF file with a specified string.
-
- Declaration
-
- ReplEach(FieldNumber : Byte;ReplStr : String);
-
- Remarks
-
- FieldNumber is the number of the field in the .DBF
- file structure. ReplStr is the string with which
- the field is to be replaced. When replacing date
- fields, remember that the date string must be in
- the form "19890214".
-
- ************************
-
- Replicate function
-
- Function
-
- Fills a string with a specified number of a
- specified character.
-
- Declaration
-
- Replicate(Ch : Char;Count : word) : String;
- Externally declared in Flash.obj.
-
- ************************
-
- RTrim function
-
- Function
-
- Trims trailing blanks from a string.
-
- Declaration
-
- RTrim(InStr: String): String;
-
- ************************
-
- Say procedure
-
- Function
-
- Displays a particular field at a specified row and
- column.
-
- Declaration
-
- Say(FieldNumber,Row,Col : Byte);
-
- Remarks
-
- FieldNumber is the position of the field in the
- .DBF file structure.
-
- ************************
-
- SetColor
-
- Function
-
- Sets foreground and background color before a call
- to ClrScr.
-
- Declaration
-
- SetColor(FG,BG : Byte);
-
- ************************
-
- ShowStatus procedure
-
- Function
-
- Displays status of .DBF file, after a call to
- ReadDBHeader.
-
- Declaration
-
- ShowStatus;
-
- ************************
-
- Sub function
-
- Function
-
- Subtracts two numeric fields - field2 is
- subtracted FROM field1.
-
- Declaration
-
- Sub(Field1,Field2 : Byte) : string;
-
- Remarks
-
- Field1 and Field2 are the order numbers of the
- respective fields as they appear in the .DBF
- structure.
-
- *************************
-
- Sum function
-
- Function
-
- Sums a numeric field in all records in a .DBF
- file.
-
- Declaration
-
- Sum(FNo : Byte) : Real;
-
-
-
- ************************
-
- TimeNow function
-
- Function
-
- Returns current time in formatted string.
-
- Declaration
-
- TimeNow : TimeStr;
-
- *************************
-
- Today function
-
- Function
-
- Returns current date in .DBF date field compatible
- format.
-
- Declaration
-
- Today : DateStr;
-
- *************************
-
- Upper function
-
- Function
-
- Converts a string to upper case.
-
- Declaration
-
- Upper(InStr: String): String;
- Externall declared in Flash.obj.
-
- ************************
-
- ValidDate function
-
- Checks whether a date is valid, and returns True
- or False.
-
- Declaration
-
- ValidDate(InDate : DateStr): boolean;
-
- *************************
-
- Wait procedure
-
- Function
-
- Displays a prompt, 'Press any key to continue...',
- and waits for a key press.
-
- Declaration
-
- Wait;
-
- ************************
-
- WriteDBHeader procedure
-
- Function
-
- Updates a .DBF file header.
-
- Declaration
-
- WriteDBHeader;
-
-
- ************************
-
- Zap procedure
-
- Function
-
- Deletes all records in a .DBF file.
-
- Declaration
-
- Zap;
-
- Remarks
-
- CAREFUL ! This procedure really does remove all
- records, completely rewriting the file.
-
- ************************
-
- (**** Revision History ****)
-
- 2/7/89 - Version 1.0 released
-
- 2/8/89 - Version 1.1 - fixed bug in numeric input that
- caused truncation of integers. Also, recompiled in
- $N-,$E+ state to allow for 8087 emulation on non-8087
- machines. Fixed range error in array indexing.
-
- Renamed unit TPDB10.tpu to TPDB.tpu. Future versions
- will retain this name.
-
- 2/10/89 - Version 1.2 - Modified indexing routines to
- allow for index keys up to 254 characters.
-
- Added boolean variable, UCKey, which allows indexes to
- be created on upper case form of keys.
-
- Added procedures Prompt and Upper.
-
- Added procedures Flash, FlashC, and FlashFill.
-
- Added CheckScreen procedure.
-
- Expanded documentation and added demo files.
-
- Temporarily removed source code from this doc file
- pending further additions and decision on which source
- to include.
-
- 2/14/89 - Version 2.0 - Added TPDB error handler.
-
- Improved documentation.
-
- Fixed bug in Display procedure.
-
- Added Sum and FieldToStr functions, NextRec and
- PrevRec procedures.
-
- Added BOF and EOF functions.
-
- Added PrevDBKey and NextDBKey procedures.
-
- Added Repl and ReplEach procedures.
-
- Added FillRecs procedure.
-
-
- 2/22/89 - Version 2.0 - Modified indexing routines to
- allow key expressions which evaluate to a string to be
- passed to the indexing routines.
-
- Improved documentation.
-
- Added new assembler string and video handling
- procedures.
-
- Added source for TPDB.tpu.
-
- Added TPDBDate.tpu - date handling routines, with
- source.
-
- Added TPDBMath.tpu - mathematical functions, with
- source.
-
- Because of significant revisions and additions to the
- original source, released this version as version 2.0.
-
- ********************************************************
- End of Documentation - TPDB Version 2.0
- Copyright 1989 Brian Corll
- and
- Ten B.C. Micro Systems
- ********************************************************
-
-
-
-
-