Modify

Opened 13 years ago

Closed 13 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 Changed 13 years ago by anonymous

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

comment:2 Changed 13 years ago by Jpm

  • Resolution set to No Bug
  • Status changed from new to closed

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

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.