
R.F.R. V4.5
===========

1. Introduction
---------------

RFR is a database program.  It works by storing data in the standard
records-and-fields manner.  The number of records allowable in a file is
practically unlimited.  The maximum number of fields is 16.

RFR data is saved in two separate files:

1.  Information on the Field lengths and Fieldnames.  This file is
relatively short but is very necessary.  It's filename ends with `.DAT'

2.  The actual database itself.  The length of this file will depend on how
many records your file contains.  It's filename ends with `.RFR'

Included with RFR (in the `RFR_Files' Directory) are two files called
`Nations.DAT' and `Nations.RFR'.  This is a database containing all the
countries in the world with information on their Population and Area, etc.
Also, there are a number of IFF picture files in the `RFR_Pictures'
Directory.  These are also for use with the `Nations' database.  For
further information on this, and examples of use, see `RFR.Examples.Doc'

2. Instructions
---------------

The screen usually shows one record at a time.  The current record's
number, together with the current file's name, are shown in the screen's
title bar.  All RFR functions are selected using standard Amiga menus.
Most of the options also have keyboard shortcuts.

Here is an explanation of what the entries in the menus do:

(a) PROJECTS MENU

Open - Brings up a File Selector window for you to load a RFR data-file.
You can click on either the `.RFR' or the `.DAT' file to load.  Once
loading is complete, Information on the file will be displayed.

Create - Begin a new file.  You must enter the name of each field, it's
length, and it's justification (ie, Left or Right).  You can also specify a
picture field and path.  Click on `No Pictures' if there are to be no
pictures in your database.  More about pictures later.  When you have done
this, the appropriate `.DAT' file will then be created.  The new file must
then be loaded by selecting `Open' before any records can be created.

Delete - Will delete an RFR database.  Both the `.RFR' and `.DAT' files
will be deleted (if they exist).

Info - Display Information on the currently loaded file.

Save ASC - Will save the current file as an ASCII text file, so that it can
be loaded into an editor.

Quit RFR - Quit Program.

(b) DISPLAY MENU

Goto - Will ask you to input a record number.  The appropriate record will
then be displayed.

First/Last - Displays the first/last record in the database.  These two
options can also be accessed by holding SHIFT and pressing UP/DOWN cursor
keys.

Next/Prev - Displays the next (or previous) record.  Can also be accessed
by pressing the UP/DOWN cursor keys.

Next/Prev Marked - Will display the next (or previous) record that has been
`marked'.  Details of how to `mark' records are given later.  If a
particular record has been marked, an `M' will appear in the title bar.

Maths - For all numerical (right-justified) fields, some simple
mathematical quantities are calculated, ie, the sum, average, and standard
deviation of all of the MARKED records.

Picture - It is possible to assign an IFF picture to each one of your
records.  If you have done this, then selecting this option will load and
display your picture.  If a record has an associated picture, a `P' will
appear in the title bar.  After viewing the picture, click the mouse button
or press space to return to the RFR screen.

Next/Prev Picture - This option will search for the next (or previous)
record that has an associated picture.  The appropriate picture will then
be displayed.

Print Rec - Will send the currently displayed record to an output device
such as a printer.

Print Marked Recs - Similar to above, except that a large number of records
can be sent to an output device or file.  The records to be outputed are
those that have previously been `marked'.  In RFR it is possible to `mark'
certain records to be displayed.  How to mark them is explained later.  The
records that have been marked can be displayed in (i) record number order
(ii) Alphabetical Order (iii) Descending Order [for numerical fields], or
(iv) Ascending Order [again, for numerical fields].

N.B.  For (ii), (iii) and (iv), you will be asked to choose a field.  The
computer will then search through that field of each record, so that the
records may be displayed in the desired order.  NOTE:  If no output device
is selected, then the records will be printed on the screen.  You can
therefore check you have marked the correct records before printing them
out.  Press SPACE or mouse button to go to the next marked record, or
Escape to quit.

Print Device - This option allows you to set the Output Device for the
above two options.  Type in PRT:  if you want to obtain a print out.  You
can also enter a disk filename such as RAM:outputfile or DF0:OutputFile.
If you leave it blank, the output will be sent to the screen - this is the
default.

(c) EDIT MENU

Amend Rec - The currently displayed record can be changed by selecting this
option.  Simply type in the new fields or press `return' to leave a field
unchanged.

Add New Rec - Similar to Amend but adds a new record to the end of an
existing file.

Delete Rec - This makes it possible to delete unwanted records.  If you
delete a record, all the higher number records will move down one.  ie, If
you delete record 4, then record 5 will become 4, 6 will become 5, etc.

Edit Fieldnames - Simply allows the names of the Fields to be changed.
This is done by amending the `.DAT' file.

Edit Fieldlengths - This takes some time to do, since every field in every
records must be re-written.  Avoid doing this unless it is absolutely
necessary.  Note:  by making fields shorter, you will truncate what was
previously in that field.  For example changing a fieldlength from 8 to 6
will mean `abcdefgh' will become `abcdef' - ie the `gh' will be lost
forever.

Add/Delete Field - Simply enables an extra field to be added to (or deleted
from) the currently loaded database.  Like `Edit Fieldlengths', this takes
some time as each record must be re-written.

Justification - This enables you to choose whether the contents of each
field should be left (the default) or right justified.  Numeric fields are
usually right-justified.  Having right-justification for numeric fields
usually look better when `Table' format is used (see later).

Formulas - Rather than type in values for fields, it is possible to get the
computer to work them out.  If for example, you wanted the contents of
field 4 to contain the sum of the the contents of field 2 and field 3, then
you would use this option.

After you select `Formulas', you will asked the for the field number to
contain the formula.  Type in the appropriate field number, or enter 0 to
exit.  You will then be asked to enter the formula.  Formulas in this
version of RFR must be in the following format:

 constant * ( fx + fy )

where `constant' is any number - the result will be multiplied by this
number.  `x' and `y' are the two field numbers to be added.  `+' can be
replaced by:  - (subtract)
                         * (Multiply)
                         / (Divide)
                         :  (Sum)

Examples:

 100 * ( f2 / f1 )    : Calculates field2 / field1, and multiplies by 100.

 1 * ( f1 : f4 )      : Calculates the sum of all fields from field1 to
                        field4. (ie field1 + field2 + field3 + field4)

NB:  After you define a new formula for a field, the disk file will then be
resaved with the new values.  Consequently, defining or redefining formulas
causes any previous contents of the field to be lost.

Picture - This enables you to assign pictures to the records.  You can only
assign one picture to each record.  There are two things to define in order
to use pictures:

(i) The `Picture Pathname'.  That is, the drawer in which the IFF pictures
files are kept.

(ii) The Picture Field.  The contents of the picture field are used to
define the corresponding picture's filename.  For example, if your Picture
Field was `Field 2', and Field 2's contents were `abc', then the
corresponding picture should have filename `abc'.  If your database is not
not have pictures, simply select `No Pictures!'.

Note:  All Amending Functions change the actual disk file, since the
database is not first loaded into memory.

(d) MARK MENU

The options in this menu will `mark' certain records, as mentioned earlier.

Mark All - Marks every record.  (Initially, all the records in the file are
`marked').

Swap All - Swaps marked with unmarked records.

String Search - Will cause the Search Screen to appear.  Here you can enter
the string to be searched for, and the field that is to be searched
through.  Simply select the options by clicking on them with the mouse,
then on `OK, search'.  Note:  you must press return after entering the
search string.  All records that contain the search string, will become
`marked' records.

Numerical Search - Similar to string search, but instead you can mark
records whose fields contain numbers.  Note there are an additional three
options here:  You can search for records which have numbers less than,
equal to, or greater than, the number you have chosen.

Mark Individual - This enables you to see each record, one at a time, and
decide whether or not you want to mark it.  Press `y' to mark, `n' to
unmark, `l' to leave as is, and `q' to exit.

Mark Pictures - This option will search through the records, and mark all
those which have associated pictures.  If you have many records, this may
take a while.

Operator - Results of several searches can be combined with this option.
For instance, if you want to mark only those records that appear in two
searches, simply choose `AND' from list of operators.  `OR' marks records
that appear in either search.  `XOR' marks records that appear in only one
of the searches.  By selecting `Ignore Previous', the results of previous
searches will be ignored.  `Ignore Previous' is the default.  The currently
selected operator is shown if `Info' is selected from the `File' Menu.

(e) PREFS MENU

Flags - this option is used to define which fields are to be displayed.
Only fields whose names appear in reverse lettering will be shown.  Click
on any field whose display flag you want to change.  You can also choose
whether to have the `Record Number' displayed.

Percentages - This enables you to see how large the content of a numeric
field of a record is, relative to the total contents of all the records.
For example, a percentage of 10% would indicate that one tenth of the total
of all records, belonged to that record.  This option is much easier to
understand by testing it for yourself, rather than trying to understand
this explanation!

Format - Allows you to choose which format to have records displayed in.
There are three formats available:

Standard:  Displays one record at a time with each field occupying one
line.  This is the default.

Spreadsheet:  Records are displayed in a table with the name of the fields
at the top, in a similar fashion to spreadsheets.  Note:  if there are too
many fields, or if the fields are too long, then there may not be enough
room on the screen.  If this is the case the table will be cut off at the
right hand side of the screen, and a `>' will be displayed in the rightmost
column.  The LEFT and RIGHT cursor keys can be used to move the table along
so that these final columns can be seen.

There are two spreadsheet formats, `1' and `2'.  The only difference is
that lines are drawn between the columns on `Spreadsheet 1', whereas there
are no lines with `Spreadsheet 2'.

In spreadsheet format, the record that is highlighted is the `current' one.
That is, if you select `Amend Rec', then the highlighted one will be
amended.

Screen - Allows you to choose the size of the RFR screen.  You can also
choose whether to have a custom or workbench screen.  If you have long
fields, and are using `Spreadsheet' format, a screen with width 320 may cut
off some of the information.  You can also choose whether or not to have
the workbench screen on or off.  However, Workbench can only be switched
off if there are no programs running from it (ie, RFR must be run from
CLI).

Prefs Save/Load - Allows you to save the current preferences (ie screen
size, display format, etc.), or load those previously saved.  The
preferences data-file is `S:RFR_Prefs'.  This file will be loaded up on
startup, but if it does not exist, the default settings will be used.

3. Important Notice
-------------------

RFR was written on an A500 Plus.  On this machine it works fine as far as I
know.  However, there do appear to be some problems with loading in
pictures on the A1200.  Sometimes the colours do not come out quite right,
but the program is still usable.

4. Author
---------

Steven Pugh
10 Wellington Close
Sandhurst Green
Sundorne
Shrewsbury
Shropshire
SY1 4SP

RFR V4.5 was written using GFA BASIC, (c) Steven Pugh 1989-1993

Permission is given to freely distribute this program provided the program
and its documents are not changed or removed.

Suggestions for improvements are welcome.
