(Warning: newby post!) Apologies if this is already known but it appears to me that if you have several single line IF statements in sequence then only the first one is evaluated! The rest are skipped over. eg: If A = B then .... If D = E then .... whatever .... Only the first IF gets evaluated. The program then skips to the line following the last IF of the sequence. In the example above the second line doesn't get executed. This is using the ide. Don't know if it works compiled or not. Converting to multi-line IF statements gets round the problem. I'm using v6.9.