However... you're pulling a fast one here. You're getting away with
calling something a boolean when it actually isn't. Apparently
Transcript is letting you get away with this.

"if tSymbolArray[char 1 to 2 of tWord] then"    should really be
"if tSymbolArray[char 1 to 2 of tWord] is not empty then"

Well, to be fair, even a strongly-typed language like C lets you do the same sort of things.
false is frequently defined as "everything other than true".

if/else is usually interpreted as "if TRUE then do this, OTHERWISE do this", not "if TRUE then do this, if FALSE do this".

In C, you get things like:

if (0)...
if ('') ...
if (NULL)...

etc... which all evaluate to false.

Of course when speed is not critical, it's easier to read if you say things like:

"if (condition = TRUE)"    instead of    "if (condition)"

As such the point is well taken, but I think it's actually accepted practice in most languages to do the latter.

- Brian

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to