#176245 - 2007-05-14 03:13 PM
ascan bug with mode = 1?
|
Christoph_Peus
Fresh Scripter
Registered: 2007-05-14
Posts: 5
|
Hi all,
please have a look at the following code and results (KiXtart 4.53):
$array = "a","b","c" ? ascan($array,"test",,,1)
results in -1 as expected, but
$array = "a","b","c","" ? ascan($array,"test",,,1)
results in 3, which is the empty element of the array which does *not* contain "test"
$array = "a","","b","c" ? ascan($array,"test",,,1)
results in 1, which is again the first empty element in the array.
Looks like a bug to me, or did I get something wrong here? (The above expamles all yield -1 with mode = 0)
Regards Christoph
|
|
Top
|
|
|
|
#176248 - 2007-05-14 03:40 PM
Re: ascan bug with mode = 1?
[Re: Christoph_Peus]
|
Benny69
Moderator
   
Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
|
Hi Christoph_Peus, and Welcome to the board
I am not sure what you are seeing, but with your examples I get: -1 -1 -1 Results as expected, do you have other code around the AScan(), can you show us your full script that you are working with so that we can better help you.
|
|
Top
|
|
|
|
#176249 - 2007-05-14 03:52 PM
Re: ascan bug with mode = 1?
[Re: Benny69]
|
Mart
KiX Supporter
   
Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
|
Weird. I get the screwed up results on 4.53.
$array = "a","b","c"
? AScan($array,"test",,,1)
$array = "a","b","c",""
? AScan($array,"test",,,1)
$array = "a","","b","c"
? AScan($array,"test",,,1)
Edited by Mart (2007-05-14 03:53 PM)
_________________________
Mart
- Chuck Norris once sold ebay to ebay on ebay.
|
|
Top
|
|
|
|
#176250 - 2007-05-14 03:56 PM
Re: ascan bug with mode = 1?
[Re: Benny69]
|
Christoph_Peus
Fresh Scripter
Registered: 2007-05-14
Posts: 5
|
Hi Benny69,
thanks for your reply.
This is my full test script: (added some information about my environment)
? @KiX ? @ProductSuite ? @ProductType ? $array = "a","b","c" ? ascan($array,"test",,,1) $array = "a","b","c","" ? ascan($array,"test",,,1) $array = "a","","b","c" ? ascan($array,"test",,,1)
The output:
E:\admin>kix32 test
4.53 272 Windows Server 2003
-1 3 1 E:\admin>
Hmmm...
|
|
Top
|
|
|
|
#176254 - 2007-05-14 04:03 PM
Re: ascan bug with mode = 1?
[Re: Jochen]
|
Benny69
Moderator
   
Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
|
I am using 4.51, wonder if there is a prob 4.53? can anyone else conferm a dif ver?
|
|
Top
|
|
|
|
#176256 - 2007-05-14 04:06 PM
Re: ascan bug with mode = 1?
[Re: Mart]
|
Benny69
Moderator
   
Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
|
I think Jochen is right, will need Jooel, Shawn or Doc to move this to Beta.
|
|
Top
|
|
|
|
#176257 - 2007-05-14 04:09 PM
Re: ascan bug with mode = 1?
[Re: Benny69]
|
Mart
KiX Supporter
   
Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
|
4.50 (does not support the extra flags):
$array = "a","b","c"
? AScan($array,"test",,)
$array = "a","b","c",""
? AScan($array,"test",,)
$array = "a","","b","c"
? AScan($array,"test",,)
Sleep 10
4.52:
$array = "a","b","c"
? AScan($array,"test",,,1)
$array = "a","b","c",""
? AScan($array,"test",,,1)
$array = "a","","b","c"
? AScan($array,"test",,,1)
Sleep 10
_________________________
Mart
- Chuck Norris once sold ebay to ebay on ebay.
|
|
Top
|
|
|
|
#176258 - 2007-05-14 04:14 PM
Re: ascan bug with mode = 1?
[Re: Mart]
|
Benny69
Moderator
   
Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
|
thanks Mart looks like 4.52 has the same results as 4.53
|
|
Top
|
|
|
|
#176261 - 2007-05-14 04:40 PM
Re: ascan bug with mode = 1?
[Re: Glenn Barnas]
|
Benny69
Moderator
   
Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
|
Glenn, you get incorrect results on 4.51? I get the correct results in 4.51
|
|
Top
|
|
|
|
#176264 - 2007-05-14 08:52 PM
Re: ascan bug with mode = 1?
[Re: Benny69]
|
Glenn Barnas
KiX Supporter
   
Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
|
Running
break on
@KIX ?
$array = "a","b","c"
AScan($array,"test",,,1) ?
$array = "a","b","c",""
AScan($array,"test",,,1) ?
$array = "a","","b","c"
AScan($array,"test",,,1) ?
yields
BARNASGLAPTOP - C:\Temp>kix32 x.kix
4.53
-1
3
1
BARNASGLAPTOP - C:\Temp>kix324.52 x.kix
4.52
-1
3
1
BARNASGLAPTOP - C:\Temp>kix324.51 x.kix
4.51
-1
3
1
Glenn
_________________________
Actually I am a Rocket Scientist!
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 854 anonymous users online.
|
|
|