Viktor1703
AutoIT Гуру
- Сообщения
- 1,535
- Репутация
- 413
Код:
#include <Array.au3>
Dim $aOld[2][10]
For $i = 0 To UBound($aOld) -1
For $j = 0 To UBound($aOld, 2) -1
$aOld[$i][$j] = Random(1, 1000, 1)
Next
Next
_ArrayDisplay($aOld)
$new_Array = ArrayReverse($aOld)
If IsArray($new_Array) Then
_ArrayDisplay($new_Array)
EndIf
Func ArrayReverse($aArray)
Local $iRow, $iCol, $aResult
If (IsArray($aArray) And UBound($aArray, 2)) Then
$iRow = UBound($aArray)
$iCol = UBound($aArray, 2)
If (($iRow > 0) And ($iCol > 0)) Then
Dim $aResult[$iCol][$iRow]
For $column = 0 To $iCol -1
For $row = 0 To $iRow -1
$aResult[$column][$row] = $aArray[$row][$column]
Next
Next
Return $aResult
EndIf
EndIf
Return 0
EndFunc