Originally Posted by lansalot
:)
Of course it's an error - you aren't making a statement that can possibly evaluate in terms of True or False. Hence my saying that an IF statement must ALWAYS evaluate to either true or false. Saying that it doesn't always have to by showing that it throws an error if you don't, well, umm.. kind of proves my point, no ?
In the above, the longhand of "If A=B" is actually "If (A=B)=true" when you add the =true construct...
Nice work on the testing however, I wouldn't have bothered my azz... :p
All up to the individual and their coding style I guess.