Modify

Opened 14 years ago

Closed 14 years ago

#2098 closed Bug (No Bug)

_ArraySearch and StringInStr Problem / Bug?

Reported by: anonymous Owned by:
Milestone: Component: AutoIt
Version: 3.3.8.0 Severity: None
Keywords: Cc:

Description

Hi,

iam not sure but i think we found a Bug in _ArraySearch and/or in StringInStr.

I will explain you the Problem.

Create a Array "DNSServer" with the following Ip Addresses:
192.168.2.2
192.168.2.25
192.168.2.255

and a Second Array $infoarr with

192.168.2.1
192.168.2.255

;Now search we search in the infoarr Array for the IP Addresses in the Array "DNSServer"

for $a = 1 to 1

For $i=1 to UBound($DNSServer)
$sSearch = $DNSServer[$i-1]

$sColumn = "2"

;If @error Then Exit
$sColumn = Int($sColumn)
$iIndex = _ArraySearch($infoarr, $sSearch,0,0,0,1,-1,$sColumn)

For $j=1 to UBound($infoarr)

;msgbox(0,"",$sSearch & " " & $infoarr[$j-1][2])
;if ($sSearch =$infoarr[$j-1][2]) Then
;msgbox(0,"",$sSearch & " " & $infoarr[$j-1][2])
;EndIf


$location = StringInStr($infoarr[$j-1][2], $sSearch, 2)

if $location > 0 Then
msgbox(0,"","found")
msgbox(0,"",$sSearch & " " & $infoarr[$j-1][2])
EndIf

Next

We get 3 Results (192.168.2.2,192.168.2.25,192.168.2.255) but we search only for 192.168.2.255.

Can you help me here?

Steve

Attachments (0)

Change History (2)

comment:1 by anonymous, 14 years ago

Did you post this in the general help forum first?
I believe the issue is in your code.

comment:2 by J-Paul Mesnage, 14 years ago

Resolution: No Bug
Status: newclosed

As stated by anonymous you must go to the forum first to get help.
This is a bug reporting place not a forum.
Your script is incomplete how do you declare $DNSServer and $infoarr?
missing 2 Next's and the #include you use

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.