Fp runtime errors

GCC Consulting gcc at optonline.net
Sat Apr 17 09:33:03 PDT 2004


Just a friendly reminder (suggestion), if you have a routine that allows form
printing from within *clerk, make sure you either do a save or write prior to
the print routine running.  This will insure that either a new record entered or
one that has been changed doesn't disappear if a printing error occurs causing
the user to be dumped.

We often warn people to save word processing documents or spreadsheets often and
especially before printing, we should take this to heart in our own programming.

Case in point, I had to modify a program for one of my client's which was using
6 sets of 15 contiguous associated fields.  Each set had an array mapped to it.
This program works like a spread sheet 15 "rows" by 6 "columns".

Everything worked fine until I was asked to expand the program to one more
"line".  So, to make life a little easier, I added 5 more sets of associated
fields to the end of the file. No longer contiguous associated fields.  This
also caused me to have to use a second set of arrays to hold the new values.

I print a statement using 4 forms, header, detail line 1, rest of details,
total. Based on the size of his logo, I can only print a maximum of 20 detail
lines on a page.

If:
Then:FORMM header
If: ct = "1"
Then: FORMM line_1;GOTO loop_dt
If:
Then: FORMM line_2;GOTO loop_dt
Done if:
   then:form totals;END

However, this created a problem when printing with array index errors when just
15 items are entered. I hadn't tested just 15 (my fault, reset of the array
index). I needed to transition to the second set of arrays to print "lines"
16-20. 

My client entered all of his information. Went to print his statement from the
entry program.  Got an array index error and lost all of his data as he was
dumped from the program.  I have corrected the problem and also added a write
just be for the print job is run to insure no more lost effort.

Richard Kreiss
GCC Consulting 







More information about the Filepro-list mailing list