Anomolous is among
FlexibleLearning at aol.com
FlexibleLearning at aol.com
Sat Jul 23 04:10:32 EDT 2005
My suggestion:
For safety, include a scope definition when using 'is among', as in...
if [tStr] is among char|word|item|token n to -m of [tSrc]
e.g. if "penguin" is among word 1 to -1 of "1 2 3 4 "
This copes with the current engine's potential interpretation anomolies of
string literals.
/H
Brian Yennie wrote...
>How about this rule:
>
>Transcript fails when determining if a word is among the words of a
>string literal WHEN:
>The string literal ends with <space> AND, in the case of a chunk
>expression, includes that last space.
>
>In any case, it definitely looks like a bug and smells of some check
>for end-of-string, next-word, and NULL going wrong in the engine...
>> Yeah. But it seems to be a little more involved than that:
>>
>> put "planets" is among the words of char 4 of "1 2 "
>> ==> true
>>
>> put "planets" is among the words of char 2 of "1 2 "
>> ==> false
>>
>> Weird.
>>
>>on mouseUp
>> constant x = " "
>> put "planets" is among the words of x
>> end mouseUp
>>
>> ==> true
More information about the use-livecode
mailing list