Keith Lynn wrote:I ran your programs and got false on both
Grrr!! I found the problem...
In my original copy of Version 1, I missed the fact that I had accidentally added a semicolon at the end of the if statement:
I've spent hours breaking down every aspect of the code and trying to understand why it wasn't working as it was supposed to. I've never run into that problem before, but it makes perfect sense why it wouldn't work the way I wanted it to.
Thank you for your help. It helped me to identify the problem and probably saved me from more hours spent looking in the wrong direction.
Sorry if I wasted your time.