Howard Rifkin wrote: >This is confusing me. >The response to the variable 'answer' is a Y. >Yet this portion of the code isn't working. Shouldn't the logic just fall >thru because the response was a Y. >IF SUBSTR(ANSWER,1,1) /= 'Y' | ANSWER /= 'YES' THEN > DO > SAY ANSWER > SAY 'THE WRONG RESPONSE HAS BEEN ENTERED' > SAY > SAY 'PROCEDURE IS TERMINATING, PLEASE TRY AGAIN' > EXIT > END
Sure it's working as implemented, just not as designed -- change the OR to AND and it will do what you want. You're saying "If the answer doesn't start with Y *or* the answer isn't YES then do this stuff. When it's "Y", the first test fails but the second succeeds... ...phsiii
