MPE/iX - CI Programming for Stability

July 18, 2008 HP World '01 35
Some common problems:
syntax error (unmatched parenthesis), variable name typo,
reliance on a var that has not been initialized, hitting eof,
using an HFS file for I/O redirection and then referencing
FINFO(hpstdin) -- CI bug!, entry name typo (case
sensitive!), off-by-one on loop counters, unexpected user
input, re-using the same var in two places that are
executed together (popular in entry points), reading from
terminal but $stdin is already redirected, a skipped portion
of an expression or skipped commands now being
executed with different data...
Trickier problems to find:
echoing a literal “>” without escaping,word() by index but
index out of bounds, array index increment and
reference in same loop, unmatched endwhile or endif,
creating files that could contain CI metachars, date
calculations that cross day, month, year boundaries...
Debugging