Defects Index | Documentation Table of Contents
99/01/27 DEFECT IN run_survey
SYMPTOM: The two digit year 00 was trapped as a bad input.
PROBLEM: run_survey is a Unix script to assist the user control the
processing flow in normal circumstances. In this scripting
language, integer arithmetic and logical tests are permitted.
This capability is used to assist the user in identifying
command, control and data problems. One example was testing
for a meaningful value when the year and day-of-year of the
data are entered. In these logical tests, 0 implies FALSE.
Unfortunately, when the year "00" as assigned to the year
variable, this operation apparently returns a zero or false
condition. In turn, the condition of this assignment was
the basis of a test for non-numeric entries for the year
and day-of-year.
CORRECTION: run_survey:
The test for non-numeric values is now done like
let TMP=INPUT+1
rather than
let YR=INPUT
This test assures the value will be greater than zero and
therefore true if the INPUT value is zero, but still trap
non-numeric input. This, of course, "opens" a hole for
-1 but negative numbers will fault for other, obvious reason.
FOUND BY: M. Schenewerk 99/01/26
FIXED BY: M. Schenewerk 99/01/27
VERSION: 1.6 99/01/27
SOURCE: /g1/HPUX.10/Scripts
EXECUTABLE: /ngslib/hpux/scripts
NOTES: A similar problem occured for run_tdsolve, run_orbits and svlist;
all decendents of run_survey. A similar modification has been
made to these script too.
990127.run_survey
June 25, 1999
Steve Hilla