Sign in to follow this  
Followers 0
Greenseed

_ArrayAdd() 2 Dimension

4 posts in this topic

hello guys! im work on a brand new Chat server with: channel support, file transfer, security support and maybe later a voice support.

im working on the engine for channel and im needed a arrayadd() but working for 2 dimension! like this!

_ArrayAdd($Array,"String",Dimension,Index)

is my array is $test[0][0]

the first [0] is the Dimemsion and the second [0] Index or inverse like you wan!

i need the arraydel too.

thx in advance!


GreenseedMCSE+I, CCNA, A+Canada, QuebecMake Love Around You.

Share this post


Link to post
Share on other sites



i only note arrayadd as

_ArrayAdd ( $avArray, $sValue )

i dont see deminsion or Index

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

you can create a multi-dimensional array

Dim $myArray[10][20]  ;element 0,0 to 9,19
$rows = UBound($myArray)
$cols = UBound($myArray, 2)
$dims = UBound($myArray, 0)

MsgBox(0, "The " & $dims & "-dimensional array has", _
    $rows & " rows, " & $cols & " columns")

good luck

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Hi,

Have you looked at my non-standard UDF from my signature?

"Array2.au3".

I use a 1D array as a row or column to add at end (default) or at numbered line or column. Examples in that post

_ArrayReplace2DRow(ByRef $avArray, $aRowArray, $nRow = '')

_ArrayReplace2DColumn(ByRef $avArray, $nRow = '')

_ArrayInsert2DColumn(ByRef $avArray, $aRowArray, $nRow = '')

_ArrayDelete2DColumn(ByRef $avArray, $nRow = '')

_Array2DCreateFromArray($ar1_Array_Row1,$Displayindex=1, $ZeroRowAsHeader=0)

_Array2DCreateFirstRow( $aRowArray)

_ArrayInsert2D(ByRef $avArray, $aRowArray, $nRow = "")

_ArrayDelete2D(ByRef $avArray, $nRow = '')

Best, Randall

[Note you would only need "Array2.au3" unless you want to use the GUI display as well; then "Array2D.au3"]

Edited by randallc

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0