| DTFMAKE lets programmers use professional software development tools
when programming Q&A databases. |
| DTFMAKE is a programmer's tool which enables programming outside of
Q&A. This eliminates Q&A's limitation of viewing at most 6 lines
at a time and allows much more powerful programming tools to be used. |
| This screen shot shows what a program spec would look like using a professional
programmer's editor, with color syntax highlighting. Notice, for example,
that the first line is a comment (indicated by the // and displayed in
red). Also, the cursor is on the sixth line, so it is displayed in yellow.
Literals and numbers are green, key words (such as IF, AND, GOTO) are blue,
and so forth. |
 |
| To prepare for using DTFMAKE on one of your own databases, you would
use DTFSPECS to extract all of the program specs
for the database, each field into a separate file.
|
| You would then get a good programmer's editor, one that can have multiple
windows open and one that has the ability to compile programs from within
the editor. A powerful shareware editor that has these features, Multi-Edit
Lite, is included with DTFMAKE and is properly configured so that you are
ready to work to the fullest immediately. Multi-Edit is from
American
Cybernetics.
|
| (In fact, included in the package is a ready-to-run tutorial. This lets
you see immediately how much DTFMAKE, and a good editor, can do for you.)
You edit the source files to put in comments, like this:
// Do we need to update the key?
IF @left(LastName,5) <> Key THEN {
...
|
| The text after the // is a comment. Extensive comments are a wonderful
thing. You can maintain a history of changes to a program spec, including
when and why you made certain changes. You can leave in old code, not sure
whether you might need it again, simply by making it a big comment. While
Q&A version 5 has comments, they are very limited in nature. (In fact,
Q&A comments consume valuable programming space.)
|
You can also use the DTFSPECS notation that keeps both names and numbers
in the source. So instead of having the following
#8732 = 2 * 3.1416 * #994;
you can have
[Circumference]#8732 = 2 * 3.1416 * [Radius]#994;
|
| You can use the editor to open windows on several fields which are interrelated
and which you wish to change. Once you have changed one or more fields,
you would want to put the changed program specs for those fields back into
the database.
|
| All you have to do is tell the editor you are ready (typically by pressing
F9), and the editor runs DTFMAKE for you. DTFMAKE checks the files to see
which you have changed and it makes temporary copies of any files you have
changed. Working with the copies, it removes comments, eliminates names,
and squeezes out extra spaces used for indentation. DTFMAKE also creates
a macro to incorporate the temporary files properly into the database's
program specs. All you do is run the macro from within Q&A and the
programming specs are updated to match the files you edited.
|
| This next screen shot would be typical of what you'd see after running
DTFMAKE following an editing session. It reports that two fields have been
changed. |
 |
| If the user pressed "L" to work through a list of fields that changed,
the next screen shot would come up. The "y" indicates that the program
spec for this field should be stuffed into the DTF.
|
 |
| When all fields have been selected, the following screen shot is what
you'd see. It tells you to go to Q&A and run the macro that will incorporate
the programming specs.
|
 |
| Finally, you tell DTFMAKE whether everything loaded without a hitch,
so it can keep accurate track of the status of each field. |
 |
With the professional version of Multi-Edit, and with other professional
programmer's editors, there are features such as "template expansion."
With template expansion, if you type "IF" and press the space bar, the
editor automatically expands what you typed into
|
| |
IF ^ THEN {
} ELSE {
}; |
| with the cursor positioned where the ^ is (which is not actually present).
|
| Another feature is color syntax highlighting. With this, keywords are
one color, punctuation another, quoted text yet another, and so forth.
It is a feature that really makes editing much much easier. See the first
screen shot, above.
|
| Using DTFMAKE and a good editor will change the way you program and
you will never want to go back to the six line window again. |