多维数组计数的问题
#include <Array.au3>dim $arr
$arr = 'abc'
$arr = '6'
$arr = 'bcd'
$arr = '5'
$arr = 'cde'
$arr = '5'
$arr = 'def'
$arr = '5'
$arr = 'efg'
$arr = '6'
$arr = 'efg'
$arr = '6'
$arr = 'fgh'
$arr = '5'
$arr = 'ghi'
$arr = '5'
_ArrayDisplay($arr)
如何统计出列子里面6下面的5数量.并和前面一个6进行对应呢?
Dim $arr
$arr = 'abc'
$arr = '6'
$arr = 'bcd'
$arr = '5'
$arr = 'cde'
$arr = '5'
$arr = 'def'
$arr = '5'
$arr = 'efg'
$arr = '6'
$arr = 'efg'
$arr = '6'
$arr = 'fgh'
$arr = '5'
$arr = 'ghi'
$arr = '5'
$s = ""
$M = ""
For $i = 0 To UBound($arr) - 1
If $arr[$i] = "5" Then
If $s = "" Then $M = $i
$s += 1
Else
If $s And $M Then
$arr[$M - 1] = $s
EndIf
$s = ""
$M = ""
EndIf
Next
If $s And $M Then
$arr[$M - 1] = $s
EndIf
_ArrayDisplay($arr) 怎么提示错误:“_ArrayDisplay($arr)”是未知函数? 不好意思,没看清少了个#include <Array.au3>{:1_518:}
页:
[1]