Page 1 of 1 1
Topic Options
#202931 - 2011-08-19 07:59 PM 4.62 AScan
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2127
Loc: Tulsa, OK
I've begun experiencing some odd results from AScan once I upgraded to 4.62. For some reason it returns a zero no matter what if the array begins with an empty element.

I would think this would return a 2, but I keep getting zero. The example below returns a 0 for both checks.

 Code:
$startingdates = "","2011/08/01","2011/08/08"

$check = "2011/08/08"
? "AScan result: "+AScan($startingdates,$check,,,1)

$check = "poop"
? "AScan result: "+AScan($startingdates,$check,,,1)

get $




Edited by ShaneEP (2011-08-19 08:49 PM)
Edit Reason: typo in check date

Top
#202932 - 2011-08-19 08:08 PM Re: 4.62 AScan [Re: ShaneEP]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4557
Loc: USA
Confirmed...

4.61
AScan result: -1
AScan result: -1

4.62
AScan result: 0
AScan result: 0

Top
#202933 - 2011-08-19 08:13 PM Re: 4.62 AScan [Re: Allen]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4557
Loc: USA
 Quote:
I would think this would return a 2, but I keep getting zero


Maybe you changed the date at some point, but the way you have the script right now, I would expect to get -1 since neither of these are in the array.

Top
#202934 - 2011-08-19 08:19 PM Re: 4.62 AScan [Re: Allen]
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2127
Loc: Tulsa, OK
Yea youre right, I originally had it so that the first would find a match and the second would not. I think i changed it to confirm right before i posted.
Top
#202936 - 2011-08-19 08:48 PM Re: 4.62 AScan [Re: Arend_]
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2127
Loc: Tulsa, OK
Well that was a typo...but even when its not, it should return -1, not 0.

Changed the test script above to correct date. It's the empty element at the beginning of the array that's tripping it up. Remove that blank element and it works as expected.


Edited by ShaneEP (2011-08-19 08:50 PM)

Top
#202937 - 2011-08-19 08:49 PM Re: 4.62 AScan [Re: ShaneEP]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
nevermind \:\)
Top
#202938 - 2011-08-19 08:53 PM Re: 4.62 AScan [Re: Arend_]
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2127
Loc: Tulsa, OK
lol, it took me a bit to figure out what was happening too.

Try this one...It returns 1's. It is seeing the first empty element as a find, and then exiting.

 Code:
$startingdates = "test","","2011/08/01","2011/08/08"

$check = "2011/08/08"
? "AScan result: "+AScan($startingdates,$check,,,1)

$check = "poop"
? "AScan result: "+AScan($startingdates,$check,,,1)

get $

Top
#205579 - 2012-08-24 06:00 PM Re: 4.62 AScan [Re: ShaneEP]
Ruud van Velsen Moderator Offline
Developer
*****

Registered: 1999-05-06
Posts: 391
Loc: Amsterdam, The Netherlands
That doesn't look right... I'll fix this in 4.63.

Ruud

Top
#205580 - 2012-08-26 01:23 PM Re: 4.62 AScan [Re: Ruud van Velsen]
Ruud van Velsen Moderator Offline
Developer
*****

Registered: 1999-05-06
Posts: 391
Loc: Amsterdam, The Netherlands
Found the culprit... The issue only occurs with an array of strings and if one of array elements contains an empty string (""). Nothing was changed in this code between 4.61 and 4.62, but the C++ runtime in Visual Studio 2010 initializes local vars differently, causing this side-effect.

In short: this is fixed in 4.63.

Ruud

Top
#205587 - 2012-08-26 05:05 PM Re: 4.62 AScan [Re: Ruud van Velsen]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4557
Loc: USA
Thumbs up. Thanks 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
0 registered and 574 anonymous users online.
Newest Members
min_seow, Audio, Hoschi, Comet, rrosell
17881 Registered Users

Generated in 0.152 seconds in which 0.128 seconds were spent on a total of 13 queries. Zlib compression enabled.