PaulS:
if ((store=HIGH) && (chqC>=thres)){ //if the stored value is high and the current value is grater than the threshold then print "a"
Assigning a value to HIGH in the if test is probably not what you want to be doing.
I tried assigning other values. Neither seemed to do the trick. The high and low thing was just something I tried before posting when I was testing a bunch of possible solutions.
Anything else you suggest I try?