MPE CI Programming for 7.5
July 22, 2008
Page 50
hp e3000
strategy
• 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 IO 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 (e.g., 2 eof
counters), reading from terminal but $stdin is already
redirected to a file
• 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