I think you are right - I will double check.

There is actually an internal function (in C) - two in fact - IsSequence and 
IsNumericSequence which we should plumb into 'is a' to make this clearer.

They basically use the extents internal impl (well an optimized form in one 
case).

Warmest Regards,

Mark.

Sent from my iPhone

> On 8 Aug 2018, at 00:11, Dick Kriesel via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> 
>>> On Aug 7, 2018, at 9:29 PM, Jerry Jensen via use-livecode 
>>> <use-livecode@lists.runrev.com> wrote:
>>> 
>>> On Aug 7, 2018, at 8:35 PM, Mark Wieder via use-livecode 
>>> <use-livecode@lists.runrev.com> wrote:
>>> 
>>> On 08/07/2018 07:57 PM, Dick Kriesel via use-livecode wrote:
>>>>> On Aug 7, 2018, at 5:47 PM, Alex Tweedly via use-livecode 
>>>>> <use-livecode@lists.runrev.com> wrote:
>>>>> 
>>>>> Is there an easy way to test whether an array is (currently) a sequence 
>>>>> array ?
>>>>> 
>>>>> something easier than
>>>>> put the extents of tArray into tmp
>>>>> if item 1 of tmp = 1 AND item 2 of tmp = the number of elements in tArray 
>>>>> then
>>>> slightly easier, at least:
>>>> function isSequence p
>>>> return the extents of p is 1, number of elements in p
>>>> end isSequence
>>> 
>>> If I'm understanding things right there's more to it:
>>> The keys all have to be integers and (I think) only those integers from 1 
>>> to (the number of keys).
>> 
>> That was my understanding as well.
>> .Jerry
> 
> "the extents" implements those rules, so "isSequence" doesn’t need to.
> 
> Or is there evidence "isSequence" fails?
> 
> — Dick
> _______________________________________________
> use-livecode mailing list
> use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to