Page 1 of 1 1
Topic Options
#170760 - 2006-11-28 03:52 AM Problem with Case Sensitive AScan since 4.51
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
This works correctly in 4.50, but not 4.51 or higher
Code:
Break On

$ = SetOption('CaseSensitivity', 'On')

; Define the array, load it with all printable ASCII chars, from Space on
Dim $A[95]
For $X = 0 to 95
  $A[$X] = Chr($X + 32)
Next

; Find the index of the lower case "a"
$P = AScan($A, "a", "", 0)

; Display the pointer, and the contents of that array element
'Ptr: ' $P '   (Ascii code ' $P + 32 ')   Contents: ' $A[$P] ?


The array has all printable ASCII chars in it - upper case comes before lower case.. so, searching for "a" should return "a" (97), not "A" (65).

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#170768 - 2006-11-28 10:19 AM Re: Problem with Case Sensitive AScan since 4.51 [Re: Glenn Barnas]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
wonder if that instr enablement introduced in 4.51 broke it...
_________________________
!

download KiXnet

Top
#176870 - 2007-06-10 10:30 PM Re: Problem with Case Sensitive AScan since 4.51 [Re: Lonkero]
Ruud van Velsen Moderator Offline
Developer
*****

Registered: 1999-05-06
Posts: 391
Loc: Amsterdam, The Netherlands
Thanks, I'll have a look!

Ruud

Top
#176957 - 2007-06-13 04:21 PM Re: Problem with Case Sensitive AScan since 4.51 [Re: Ruud van Velsen]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
See the CODEC udf for a quick way to test this. The first post used an array of characters, and AScan could not find the lower case match. Changing to ASC values as done in the second post works.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#177205 - 2007-06-23 08:37 PM Re: Problem with Case Sensitive AScan since 4.51 [Re: Glenn Barnas]
Ruud van Velsen Moderator Offline
Developer
*****

Registered: 1999-05-06
Posts: 391
Loc: Amsterdam, The Netherlands
Got it. This is fixed in the next build.

Thanks again for the report!

Ruud

Top
#177991 - 2007-07-16 09:35 PM Re: Problem with Case Sensitive AScan since 4.51 [Re: Ruud van Velsen]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
I can verify that this now works - the "as.kix" is the example code from the top post.
 Code:
COMPUTER - U:\>kix324.53 as.kix
Ptr: 33   (Ascii code 65)   Contents: A

COMPUTER - U:\>kix324.60 as.kix
Ptr: 65   (Ascii code 97)   Contents: a

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#178109 - 2007-07-20 11:41 AM Re: Problem with Case Sensitive AScan since 4.51 [Re: Glenn Barnas]
Ruud van Velsen Moderator Offline
Developer
*****

Registered: 1999-05-06
Posts: 391
Loc: Amsterdam, The Netherlands
Cool,thanks!
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 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

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