Page 1 of 1 1
Topic Options
#79438 - 2003-01-15 09:11 PM Bug or documentation inconsistency with ASCAN
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
ASCAN seems to only work with one-dimensional array. However, this is not noted in the documentation. Additionally, ASCAN does not produce an error if fed a multi-dimensional array and returns an incorrect '-1' as result.
Proof:
code:
$b[0,0]=1
$b[0,1]=2
$b[1,0]=3
$b[1,1]=4
? $b[1,1]
? ascan($b,1)

If ASCAN does indeed not support n-D arrays, then it should create an error message.
_________________________
There are two types of vessels, submarines and targets.

Top
#79439 - 2003-04-04 04:29 PM Re: Bug or documentation inconsistency with ASCAN
Paolo Gilardi Offline
Fresh Scripter

Registered: 2002-11-18
Posts: 12
Loc: Italy - Milano
having the same issue. looked in several forums without find any hints on that.
does anybody know about this possible bug ?
thanks,
paolo

Top
#79440 - 2003-04-04 04:54 PM Re: Bug or documentation inconsistency with ASCAN
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Use the IsInArray() UDF instead as it supports n-D arrays.
_________________________
There are two types of vessels, submarines and targets.

Top
#79441 - 2003-04-07 06:13 PM Re: Bug or documentation inconsistency with ASCAN
Ruud van Velsen Moderator Offline
Developer
*****

Registered: 1999-05-06
Posts: 391
Loc: Amsterdam, The Netherlands
The current implementation of AScan indeed only supports single dimension arrays (primarily because I haven't figured out how to return the result for a multi-dim array yet). The '-1' return value is intended to indicate this.

Regards,

Ruud

Top
Page 1 of 1 1


Moderator:  ShaneEP, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 781 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.025 seconds in which 0.011 seconds were spent on a total of 12 queries. Zlib compression enabled.