[已解决]奇怪的错误
本帖最后由 lxsky 于 2013-5-20 15:59 编辑以下是我的一个StringReplace 测试,主要是要替换On为Off,很奇怪执行几个循环后(次数不等)这句就会出错 $TempUrl = StringReplace ($OnArray,"=On","=Off")
有大侠能解释一下吗?#include <Array.au3>
Dim $OnArray = ["action=Online&company=tal&super=0","action=Online&company=tal&super=0","action=Online&company=tal&super=1"]
;_ArrayDisplay($OnArray)
For $i = 50 To 1 Step -1
$m=Random (0,UBound($OnArray),1)
ConsoleWrite($m)
$TempUrl = StringReplace ($OnArray,"=On","=Off")
ConsoleWrite($TempUrl & @CRLF)
Next
#include <Array.au3>
Dim $OnArray = ["action=Online&company=tal&super=0", "action=Online&company=tal&super=0", "action=Online&company=tal&super=1"]
;_ArrayDisplay($OnArray)
For $i = 50 To 1 Step -1
$m = Random(0, UBound($OnArray), 1)
ConsoleWrite($m)
$TempUrl = StringReplace($OnArray, "=On", "=Off")
ConsoleWrite($TempUrl & @CRLF)
Next 原来如此,超出范围了,呵呵呵,谢谢haijie1223
页:
[1]