Crashing PanX using arraydelete(

I found by accident that, for example:
arraydelete(“a,b,c,d,e”,0,",")
will crash PanX.
I think it should return the original array if the requested position is outside of the possible range.
A.

Aren’t you missing a parameter? You need four of them for text arrays. But obviously it shouldn’t crash even if your syntax is incorrect. When I tried it, I got an error message.

Tom is correct: The syntax is

arraydelete(TEXT,ITEM,COUNT,SEPARATOR)

But Alain has found a crashing bug, indeed.

I tested this in the Formula Workshop:

arraydelete("a,b,c,d,e",2,1,",")

which delivers the correct result

a,c,d,e

You can enter negative values for ITEM, then it starts counting the elements from the end. You can enter a number bigger than the number of elements in the array, then you’ll get an empty result. But when you enter the number 0 as ITEM, then PanoramaX will crash.

arraydelete("a,b,c,d,e",-6,1,",")

will also crash. Basically, any item number that corresponds to an item before the first will crash.

Thanks to all of you for pinning this down so concretely. Unlike the last bug I commented on, this should be a relatively simple mystery to solve (since no Apple code is involved).