home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 14
/
CD_ASCQ_14_0694.iso
/
demoware
/
gestrec
/
grecdoc.us
< prev
next >
Wrap
Text File
|
1994-03-13
|
31KB
|
990 lines
┌────────────────┐
│ GESTRECORD │
│ Version 1. │
│ 15.01.1994 │
└────────────────┘
(c)opyright January 1994
Write by par JANNOTA PASCAL
I am french and would ask you to excuse my far from good English.
This program can be freely used during 2 weeks. After, and if (evidently) you
find it is an interesting program, you must pay me a licence.
You'll find in "LICENCE.US" file all useful information about it.
I hope GESTRECORD will give you the satisfaction expected and that I shall
hear from you shortly.
In the mean time, I wish you good work.
Thanks to:
- Neil Rubenking, for his book "Le guide programmeur Turbo Pascal"
"DUNODTECH" editions.
- Thomas Lachand-Robert, for his book "Programmation orientée objet en
Turbo Pascal" "SYBEX" editions.
- Borland, for his language And for the various tools given with Turbo
Vision.
- My wife and my two children for their patience.
GestRecord has online help, but in this file you can find some
supplementary explanations.
GestRecord is in Turbo Pascal 7., and use Turbo Vision application.
Futur versions will contain multi key search, the
possibility of managing more than 2 million of records, a version for
window...
GestRecord aims to reach a maximum of users: from the programer who
wants to rapidly build file records and use them in his programs, or
for the ordinary user wanting to make a directory, or a repertory...
Program setting up:
==================
On DOS prompt:
─────────────
If the files disk is compressed, you must uncompress it (in temp
directory, for example).
Go in its directory:
Ex: type on dos prompt: CD\TEMP
Type INSTALL
In Window:
─────────
After the files disk is uncompressed,
Open "File" menu,
Click on 'perform...',
In the 'command line' input line, type the acces way and
'INSTALLE.EXE'.
Ex: C:\TEMP\INSTALLE.EXE
The INSTALLE program will create:
1 root directory: GREC
3 sub-directorys: FDATAS
FHEADER
FTEMP
The GREC directory will contain: the execution file : GESTREC.EXE
the help file : GRECHELP.HLP
the resource file : GRECRES.TVR
its file : GRECDOC.US
the licence file : LICENCE.US
For Window:
An icon : GRECIMAG.ICO
the PIF file : GESTREC.PIF
The GREC\FDATAS directory will contain the data files wich will be created
by GESTRECORD.
The GREC\FTEMP directory will contain the temporary files used by the
program. Its files will always be deleted at the end of each session.
The GREC\FHEADER directory will contain the init files (.~DA and .C..)
created by GestRecord.
WARNING: If you don't execute the INSTALLE program, GESTRECORD Will not
run correctly.
Program Characteristics:
=======================
(only If you have paid the licence)
If GestRecord has sufficient memory:
- 16380 records by file,
(only 50 for the demo program)
- 255 fields by record,
- 9 data types,
- 255 different record windows simultaneously displayed,
- 255 different field windows at the same time on the desk,
- various tools
- EMS memory mangment.
Minimum configuration:
=====================
- IBM PC/AT or 100% compatible (286 minimum),
- MS DOS 5.0 or latter,
- A mouse,
- EMS Memory (not essential but advantageous).
Start Program:
=============
On DOS prompt:
─────────────
Type on dos prompt: cd\GREC,
Then type GESTREC
In Window:
─────────
Click in the GESTRECORD icon.
┌────────────────┐
│ PRINCIPAL MENU │
├────────────────┘
│
├─ File create
│ ├─ Treatment init
│ ├─ File name
│ ├─ Records types init
│ │ ├─ Number of fields
│ │ └─ Field types
│ ├─ Validation of types init
│ └─ What GestRecord does?
│
├─ File Open
│ ├─ Commence funtion
│ ├─ File name
│ └─ What make GestRecord?
│
├─ Build your file
│ ├─ Records
│ │ ├─ Modify
│ │ ├─ Add
│ │ ├─ Delete
│ │ ├─ Search
│ │ └─ Restore
│ └─ Fields
│ ├─ Modify
│ ├─ Add
│ ├─ Delete
│ └─ Search
│
├─ Fields and records windows
│ ├─ Continuous record window
│ ├─ Window for one record
│ └─ Fields
│
├─ File save
│ ├─ As the same name
│ ├─ as an another name, directory or drive
│ └─ close without save
│
├─ Tools
│ ├─ Calculator
│ ├─ Calendar
│ ├─ Mouse
│ ├─ Convert
│ ├─ Bit test
│ ├─ Clock
│ └─ Memory view
│
├─ Arrange the windows on the desk
│
└─ Quit GestRecord
PRINCIPAL MENU DESCRIPTION:
==========================
To move in the menus (and in the dialogue box), you can use the mouse or
the keyboard:
- With the mouse, click on the menu command.
- With the keyboard, you can use the 'tab' key to select a menu
and the arrows keys to choose a command,
then type on <ENTER> key.
For any help you cannot find in this file, search in online help.
1.1 |
├─ File create
│ ├─ Treatment init
│ ├─ File name
│ ├─ Records types init
│ │ ├─ Number of fields
│ │ └─ Field types
│ ├─ Validation of types init
│ └─ What GestRecord does?
|
1.1.1) Treatment init:
==============
In the 'Init' menu, choose the 'File' command.
In the 'File managment' dialogue box, you'll be able to enter some
file treatments parameters.
You can't choose this command if a file is open.
1.1.1.1) ┌ Record size ────┐
│ (∙) Constant │
│ ( ) Variable │
└──────────────────┘
By ticking/marking the appropriate box you will indicate to GestRecord wich
type of record you want to use.
- Constant record: The fields of STRING type are written on the disc
according to the length of your entry in the init session (see 1.1.3).
If the size is of 100 characters, 100 characters will be saved on the
disc even if the field contains no more than 2 characters.
The fields with STRING type cannot be stretched.
Exemple:
If in the init session, you have entered a String size of 20 characters
and if later, after many many records, you have a String with
21 characters, you won't be able to enter the whole string.
To avoid this problem, choose the constant record for records which have
only fields with numeric types (byte,integer,word...).
- Variable records: The fields with STRING type are writing on the disc
according their real length and not for the init size in the init session.
This size is always of 132 characters (the maximum).
If a field contains only 2 characters, 2 characters will be saved on
the disc.
In addition, the field size can always be increased.
WARNING: If you want GestRecord to save the STRING fields for their
real length, you must choose the 'Compress' option
(see 1.1.1.2).
1.1.1.2) ┌ file managment ───┐
│ [ ] Header │
│ [ ] Compres │
│ [ ] Index │
└───────────────────┘
With these 3 Check boxes, you can define:
- a header: impossible for create files (see 2.1.1),
- a compression: if you have chosen the variable records, your interest
is to mark this box.
With this option, the String fields will be saved on the disk for
their real length and the del records won't be save.
If you haven't a lot of place on your disq, mark this box.
- Index: The records in GESTRECORD always contains an index. With it,
you'll be able to find a record very quickly.
But, if you want to init each record key or if you want GESTRECORD to
use a STRING field to build the index (see 1.1.1.4), mark this box.
If you mark this box, you must indicate to GESTRECORD the
index field (see 1.1.1.4) or in the init session (see 1.2.1).
1.1.1.3) ┌─Header size ─────┐
└───────────────────┘
You must indicate the header size only if you want 'open a file'
(see 2.1.1)and not 'create a file'.
1.1.1.4) ┌─Index field ─────┐
└──────────────────┘
If the 'Index' check box is checked (see 1.1.1.2) you can enter in this
input line the field number which will init each record key.
This field MUST be of STRING type.
GESTRECORD will deduct the 5 first letters (maximum) of the contents
field and will constitute the record index.
If the key already exists, GestRecord brings up a dialogue box to enter
a new key.
1.1.1.5) ┌ Language ──────┐
│ ( ) French │
│ (∙) English │
└────────────────┘
If you want GESTRECORD use the english langage, check the English
radio-button.
You can also enter, at the dos prompt the 'US' letter when you run
GESTRECORD.
Ex: GESTREC US
1.1.2) File name:
=========
If you choose the File|Create command, you enter the file name
in the file dialogue box.
This file will be placed in C:\GREC\FDATAS Subdirectory with '.DAT'
extension.
You can enter 8 characters maximum for the name.
1.1.3) Records types init:
==================
GESTRECORD must have certain information in order to be able to create your
file.
This information will be saved in a file and you'll longer need to enter
these.
1.1.3.1) Field number:
============
A field is a part of record.
each record can contain 255 fields and each field can be of 9 different
types (voir 1.1.3.2).
Records exemple:
Phone = Name type STRING
First name type STRING
Number type STRING
3 fields of STRING type.
(Recall: The index can be on the Name, First name or phone field: theses 3
fields are of STRING type).
Patient = Name type STRING
Address type STRING
Number1 type LONGINT
Number2 type WORD
2 fields of STRING type,
1 field of LONGINT type,
1 field of WORD type.
(Recall: the index can be on Name and Address field (STRING type) but
on Number1 and number2 field).
To indicate the field number of your record to GESTRECORD, you'll be
able to enter in the 'field number' dialogue box, a number from 1 to
255.
1.1.3.2) Field types:
===========
The field type indicates its octet size and its valid limits.
You can find the informations in the table below.
Note: A numeric field (byte, shortint, integer...) can't start
with a '0' value.
Ex: 0520 will be take by GESTRECORD for: 520.
You can't enter a value out of the valid limits.
If you don't understand the types, choose the STRING type for all your
fields.
But, the STRING type has 2 disadvantages:
- It takes more place on the disc:
Ex: you must enter a number: 2 500 000.
If the field type is LONGINT, it take 4 octets on the disc.
If the field type is STRING, it take 8 octets on the disc
(7 octets for the number + 1 octet for the string length).
- GESTRECORD can't control the input value:
Ex: You have a field of BYTE type (numbers from 0 to 255),
if you select the BYTE type for its field, GESTRECORD can control
that you only enter valid numbers, with a value from 0 to 255,
but if you choose the STRING type, GESTRECORD can't control this.
╔════════════════════╗
╔════════════╤══════════╣ TYPES ARRAY ╠═══════╤════════════════╗
║ │ ╚══════════════════╤═╝ │ ║
║ Type names │ Validite │ Octets │ Type ║
║ ───────────┼─────────────────────────────┼─────────┼────────────────║
║ SHORTINT │ -128 to +127 │ 1 │ number ║
║ ───────────┼─────────────────────────────┼─────────┼────────────────║
║ BYTE │ 0 to 255 │ 1 │ number ║
║ ───────────┼─────────────────────────────┼─────────┼────────────────║
║ INTEGER │ -32768 to +32767 │ 2 │ number ║
║ ───────────┼─────────────────────────────┼─────────┼────────────────║
║ WORD │ 0 to 65535 │ 2 │ number ║
║ ───────────┼─────────────────────────────┼─────────┼────────────────║
║ LONGINT │ -2147483648 to +2147483647│ 4 │ number ║
║ ───────────┼─────────────────────────────┼─────────┼────────────────║
║ REAL │ -2.9E-39 to +1.7E38 │ 6 │ number ║
║ ───────────┼─────────────────────────────┼─────────┼────────────────║
║ CHAR │ 1 lettre or a number │ 1 │ Char-Number ║
║ ───────────┼─────────────────────────────┼─────────┼────────────────║
║ STRING │ to 132 caractères │ 3 à 133 │ Char-Number ║
║ ───────────┼─────────────────────────────┼─────────┼────────────────║
║ BOOLEAN │ 0 or 1/ True or False │ 1 │ number ║
╚════════════╧═════════════════════════════╧═════════╧════════════════╝
For the types init, GestRecord brings up a dialogue box in which you'll be
able to enter the name (10 characters maximum), the type of each
field and the string length (132 characters maximum) if the type field
is STRING.
See online help to use this dialogue box.
1.1.4) Types init validation:
=====================
Once each field has been init, GestRecord brings up a validation window.
It will show you the number, the name, the type and the size (in octets)
of each record field.
If you have made a mistake, you close its window with the 'CANCEL' button
or with the close icon and the 'Init types dialogue box' will again appear
and enable you to rectify the mistake.
Otherwise, close the window with the 'OK' button and the init session will
terminate:
If the Index option (see 1.1.1.2) is checked, GestRecord will ask you the
field number you want to choose for the index.
Then, you can work with your file.
Note: The field number can always be modified with the field|Add command or
with the field|del command but a field type cannot be modified
once the init types session is finished.
If you have made a mistake, you must delete the field and add it
again with the next type.
1.1.5) What GESTRECORD does:
=====================
To remember your record structure, GestRecord also uses records.
You can find the stucture of these records and the init files in the
program source.
Warning: GESTRECORD is sure of the information written in its init files
and does not accept alteration without warning.
If you modify its files (.~DA and .C..), GestRecord won't be
able to locate these and will destroy your file data.
What GESTRECORD does is very simple:
For each field, the name, the type, the rank, the size, the position
of the next field and the field number is put in momory, and in the init
file (.~DA) when the file is closed.
For each record, the file position, the size, the key, the file record
rank and the file record number is put in memory, and in the init file
when the file is closed.
1.2) |
├─ File Open
│ ├─ Commence function
│ ├─ File name
│ └─ What make GestRecord?
|
1.2.1) Commence function:
==================
The commence function is the same for create file (see 1.1.1), except for
the header and its size.
If your file was not created by GESTRECORD and if it has a header, you MUST
inform GESTRECORD:
- Check the Header check box,
- Enter the header size in the 'Header size' input line.
If you don't do this, or if you enter an incorrect size, GESTRECORD won't be
able to work with your file and, worst, it will destroy its header.
If you have created your file with GESTRECORD, some parameters will be init
by themselves:
- the header size,
- the index and the index field,
- the record size (constant or variable).
But, if your file is a variable records file and if you haven't checked
the 'compress' check box, GestRecord will ask you if you want its option.
1.2.2) File name:
=========
The same dialogue box as for file create be brought up, showing a list of
file extentions '.DAT'.
Warning: To open an existant file, make sure you are in the directory
containing the file. (Use the command File|Change Dir).
1.2.3) What GestRecord does:
=====================
After the file is opened, GestRecord performs the following tasks:
- read in the init file (~.DA):
- the version number,
- the file records number,
- the valid indexs number,
- the indexs number,
- the key number for each record (for futur versions),
- the header size,
- the treat parameters,
- the name, type.. of each field,
- the size and position of each record of your file.
- read the file '~C..' to build the keys collection,
- verify the header size,
- verify the records number in your file and the records number in the
init file.
That's all!
Then, you can work with your file.
1.3) |
├─ Build your file
│ ├─ Records
│ │ ├─ Modify
│ │ ├─ Add
│ │ ├─ Delete
│ │ ├─ Search
│ │ └─ Restore
│ └─ Fields
│ ├─ Modify
│ ├─ Add
│ ├─ Delete
│ └─ Search
|
1.3.1) Records:
=======
Recall: The records are a set of different fields saved on the disc
in the order of their creation.
A record can be of 2 types:
- Constant: voir 1.1.1.1,
- Variable: voir 1.1.1.2.
Working with variable records takes longer than with constant records,
but takes less space on the disc.
Your file can contain all the records you want to save in it, but
(for instant), GestRecord can treat only 16380 records by file.
Its number is the maximum of pointers that a collection can be
contained in a memory segment:
1 Turbo pascal segment = 65520 octets
1 Turbo pascal pointer = 4 octets
65520/4 = 16380 pointers.
In further versions, GestRecord will be able to handle more than
this number.
1.1.1.1) Modify:
======
Click on the Record|Change command will bring up a dialogue box which allows
you:
- to modify each field value,
- to delete a record,
- to add a record,
- to search a record or a field,
- to restore a record.
See the online help for the use of its dialogue box.
1.3.1.2) Add:
===
Clicking on the Record|Add command add an empty record at the end of your
file. The key index will be init with a default value and later, you'll
be able to modify it.
1.3.1.3) Delete:
======
Clicking on the Record|Delete command will bring up a dialogue box in which
you'll be able to enter the record rank or the index rank or the
index key you want to delete.
Then, GestRecord will verify the validity of the entry value and will mark
the record but won't delete it.
Further, if you want to restore it, this can be done with the
Record|Restore command (see 1.3.1.5) except:
- if GestRecord has used it with the Record|Add command,
- if the 'compress' option (see 1.1.1.2) is checked in wich case, the
record will be scrubbed when the file is closed.
1.3.1.4) Search:
======
The same dialogue box as for the Record|Delete command will ask you to
enter the record rak or the index rank or the index key of record you
want to delete.
Once GestRecord has verified the entry value, a message box will show
you the record rank AND the index rank AND the index key.
If you have checked the box 'Window' in 'Search record dialogue box',
a 'One record Window' (see 1.4.2) will appear on the desk.
1.3.1.5) Restore:
=======
With Record|restore command, you can restore a record you have deleted
(see 1.3.1.3) unless if GestRecord has used it or if you have saved the
file with the compress option.
A dialogue box will show you the records wich can still be restored and
will ask you to enter the rank index of the record to be restored.
If you choose one, its record will restore.
If GestRecord can't restore the index key of this record, a default key
will be allocated, a key you can always modify later.
1.3.2) Fields:
======
Recall: A fields can be of 9 different types (see 1.1.3.2) and each record
can contain up to 255 fields.
1.3.2.1) Modify:
=======
With the Fields|change command, GestRecord brings up a 'fields managment
dialogue box' in wich you can modify the field values (voir 1.3.1.1).
1.3.2.2) Add:
===
If you want to add a field, the structure of all your records will be
modified.
After a confirmation, GestRecord will ask you to init the additional
field (name, type, string length if the type field is STRING) (see 1.1.3.2).
Its fields will be added to each record of your file.
All record and field windows and the 'fields managment dialogue box'
will be destroyed.
You can reconstruct these once the field add session is finished.
1.3.2.3) Delete:
======
As with Adding a field, you will must confirm your choice.
But, this time, GestRecord delete the field chosen in all your records.
Warning: GestRecord can't restore a deleted field and all deleted field
data will be lost.
So, Before deleting a field, remember that it is often better to keep a
useless field than lose all the data it contains.
As with the Field|Add command, all field and record windows and the
'fields managment dialogue box' will be destroyed.
1.3.2.4) Search:
=======
Its command brings up a dialogue box it containing the name of each
field of your record.
GestRecord can only find a field by its name. So remember to
give your fields a precise name in the init session (see 1.1.3.2).
Once GestRecord has found the field, it brings up a message box
who show you the name, the rank and the type of the search field.
1.4) |
├─ Fields and records window
│ ├─ Continuous records window
│ ├─ Window for one record
│ └─ Fields
|
1.4.1) Continuous records window:
=========================
The Continuous records window is really only usefull if you work with
the 'fields managment dialogue box'.
With each record change this window will show you the current record.
If you modify the field values of current record, the continuous
window will be updated.
This window can be recognised by its pale blue color.
1.4.2) Window for ONE record:
=====================
As opposed to the previous window, this one constructed only for one
specific record wich you will have indicated either by its index record
number or its index key.
This window is only updated once you have modified one of the field
records attached to it in the 'Fields Managment dialogue box'.
Its color is blue.
1.4.3) Fields:
======
The Fields Window shows you one field for all your records.
You enter the field rank in the dialogue box and GestRecord brings up
this window.
With any change in the 'Fields Managment dialogue box', the contents of
its window is updated.
You can create:
1 Continuous records window,
255 Windows for ONE record,
255 fields window.
Note: If you have a lot of windows on the desk, the progam may run
considerably more slowly, remember that the window contents is updated
for each change in the 'Fields managment dialogue box'.
GestRecord works in real mode, and you must supervised your memory if
you don't want appears a 'out of memory' message!
The fields and records windows are destroyed by GESTRECORD if:
- you close the current file,
- you add or delete a field,
- you add or restore a record (only for the continuous window),
- you delete a record (for the continuous window and for One record
window).
You can create these windows at any point in the program provided GestRecord
has sufficient memory.
If you want to create 2 windows for the same record, GestRecord
raises the existing window to the top of the desk.
1.5) |
├─ File save
│ ├─ As the same name
│ ├─ as an another name, directory or drive
│ └─ close without save
|
1.5.1) As the same name:
================
Choose the File|save command if you want to save the current file as
the same name.
GestRecord will:
- save your data,
- close the current file,
- save the init and the keys,
- close the '.~Da' and '.C..' files,
- destroy the temporary file.
You'll then be able to open another file or quit the promgram.
1.5.2) as another name, directory or drive:
===================================
Choose the fiel|save as command.
GestRecord will ask you to enter the new name file. If this file already
exist, GestRecord will ask you if you want to crush it.
The remainder of the process is the same as for Save a file (see 1.5.1).
Note: The data won't be saved in the old file.
1.5.3) Close without save:
==================
If you choose the file|no save command, GestRecord closes your file
(init and data) without saving the latest modifications, and these will
be lost.
1.6) |
├─ Tools
│ ├─ Calculator
│ ├─ Calendar
│ ├─ Mouse
│ ├─ Convert
│ ├─ Bit test
│ ├─ Clock
│ └─ Memory view
|
The calculator, the calendar, the mouse, the clock and the memory view
are Borland's tools. They are offered with Turbo vision.
I think these tools are very interesting and they can be very useful.
To use these tools, see online help.
1.6.1) Calculator:
==========
Its a simple calculator allowing you 4 basic opérations. Once created,
it remains on the desk until you close it with the aid of its closing icon.
1.6.2) Calendar:
========
The calendar displays the current month and current day, and can
provide information on past or future years.
It remains on the desk until you close it.
1.6.3) Mouse:
=====
The mouse tool allows you to change the double-click speed and invert
the right and left button.
This tool can't stay on the desk.
1.6.4) Convert:
=======
This tool is of my own creation and it allows you to convert a number
in decimal, hexa or binary format.
It can stay on the desk.
1.6.5) Bit test:
========
This tool allows you to test if a particular bit, or a group of bits is
set in a number.
Bit test and Convert tools can stay open on the desk.
Ex: You have a decimal number of WORD type and you want to know if the bit
7 is posed:
2 solutions:
- Convert tool:
1) You enter the number: for ex. 559,
2) You click the Decimal => binary radio button,
3) you click the 'OK' button,
4) in the result line the result appears in binary format:
0000001000110000
Then, you can see all the bits is posed: 4,5 and 9°.
Recall: in binary format, the bit '0' is on the right hand side of the
number, then the bit 7 is in reality the 8th bit.
Then the bit 7 isn't posed.
- Bit test tool:
1) you enter the number: 559,
2) you enter the bit rank: 7,
3) you press the 'Bit' button,
4) In the result line appears the result:
'Bit not posed'.
For a group of bits, you enter this in the 'Mask input line', in
decimal or binary format and then, click the Mask button.
1.6.6) Clock:
=====
The clock is on the upper right hand corner of the desk and shows you the
system time.
This tool can't be selected and can't be modified in GestRecord program.
1.6.7) Memory view:
===========
The memory that GestRecord has available is on the lower right corner of the
desk and shows you the size of the largest memory block available.
Then, you can check the memory capacity before creating a window.
This tool does not take the the EMS memory into consideration.
1.7) |
├─ Arrange the windows on the desk
|
The Window menu allows you to arrange your desk.
With its command you can Tile, cascade, close the different open windows.
See online help to use this command.
Recall: If you open a lot of windows, GestRecord may run more slowly.
Remember to close useless windows.
1.8) |
└─ Quit GestRecord
You can quit GestRecord only once the current file is closed.
To do this, choose the File|Quit command.
GestRecord will be destroyed and removed from your memory.
2.)
I am open to all criticism (as well as to compliments) ro indeed to all
requests for improvments to GESTRECORD.
You can reach me by mail at the address in the LICENCE.US file (the same
address for the payment of the licence - don't forget me!).
Perhaps GESTRECORD isn't perfect, (which is why I plan to make future
versions), but GestRecord has been made and tested for your pleasure and
to offer you a maximum of ease in use.
The future versions can only be made if each user pays me their licence
fee.
Without it, I won't be able to continue to program.
The ShareWare is an affair of trust and non payment of the licence fee
for the use of the program will inevitably result in its death.
Thanks.