Tell me I'm not crazy

Bob Sneidar bobs at twft.com
Tue Sep 20 14:08:10 CDT 2011


Tereza, it's my opinion that <> ought to have worked as well, as it works with other forms of non-numeric data, like strings. I think it's something that slipped by the developers. I would eventually have encountered the same thing. In fact I did encounter a similar kind of thing when checking to see if an array variable was empty, in order to determine if, say anything was returned by a database call. All array variables seem to be empty, whether there is an array there or not. 

I give you this: 
put "test" into myArray[1];put empty into myVar;put myArray = myVar
returns true. BUT
put "test" into myArray[1];put "test2" into myVar[1];put myArray = myVar
returns false. 

THAT is frickin UGLY crazy! 

Bob


On Sep 20, 2011, at 9:26 AM, Tereza Snyder wrote:

> NO you cant:
> 
> (from the docs)
> 
> Note: Arrays in LiveCode are un-ordered. This means in particular that encoding two arrays will not necessarily produce the same result, even if the arrays had the same elements. To compare two arrays, simply use the = operator directly on them rather than encoding them first.
> 
> t
> 
> 
> On Sep 20, 2011, at 11:16 AM, Andre Garzia wrote:
> 
>> Tereza,
>> 
>> No it is not crazy...
>> 
>> can we assume that arrayencode always encode the same way? because this way
>> you can simply arrayencode both values and compare them...
>> 
>> andre
>> 
>> On Tue, Sep 20, 2011 at 12:45 PM, Tereza Snyder <tereza at califex.com> wrote:
>> 
>>> 
>>> Is it crazy to assume that if "=" works, then "<>" (or in other languages,
>>> "!=") would also?
>>> 
>>> 
>>> On Sep 20, 2011, at 10:27 AM, Robert Brenstein wrote:
>>> 
>>>> On 19.09.2011 at 16:04 Uhr -0500 Tereza Snyder apparently wrote:
>>>>> Look at the docs for "="; LiveCode CAN compare arrays using "=".
>>>> 
>>>> Ah, something new learned; yes, to quote the docs:
>>>> 
>>>> The ability to compare two arrays using = was added in version 3.5.
>>> Previously, comparing two arrays would have converted both arrays into the
>>> empty string, and always returned true.
>>>> 
>>>> The docs mention comparing arrays only for the = operator.
>>>> 
>>>> Robert
>>>> 
>>>> _______________________________________________
>>>> use-livecode mailing list
>>>> use-livecode at lists.runrev.com
>>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>> 
>>> 
>>> _______________________________________________
>>> use-livecode mailing list
>>> use-livecode at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>> 
>> 
>> 
>> 
>> -- 
>> http://www.andregarzia.com All We Do Is Code.
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list