contains operator

Jeanne A. E. DeVoto revolution at jaedworks.com
Tue Feb 24 20:26:13 EST 2004


At 7:50 PM -0500 2/24/2004, hershrev wrote:
>>  "c" is not among the chars of "ab"
>From the doc. of Rev.
>"Hello" is among the words of "Hello World" -- evaluates to true
>"Hell" is among the words of "Hello World" -- evaluates to false
>which means even if "c" is among "abc" it'll return false.

That's not quite right. If you check
   c is not among the chars of "abc"
it will evaluate to true, because you are testing chars (not words). 
In this case, "c" is one of the characters in "abc", so the 
expression evaluates to true.

The examples from the docs test words, not chars. "Hell" is not one 
of the words in "Hello World", so the example evaluates to false. 
However, if you check whether "H" is among the chars of "Hello 
World", it will evaluate to true.
-- 
jeanne a. e. devoto ~ jaed at jaedworks.com
http://www.jaedworks.com


More information about the use-livecode mailing list