Jump to content

Displaying The Entire Content Of An Array...

Recommended Posts

Hey (again) :whistle:

$NickLength=Random (1,12)
Dim $NameArray [$NickLength]
;Nick loop
For $nickLoop=0 to $NickLength-1
   $myAsciiRandNickChar=Int (Random (20,126))
   $NameArray [$nickLoop] = Chr($myAsciiRandNickChar)
;How to displaye a MsgBox with the antire content of the $NameArray array?

10x (again) B)

Edited by Newbie2
Link to post
Share on other sites


MsgBox(0,"", DisplayArray($NameArray, ","))

Func DisplayArray(ByRef $array, $pad)
  Local $text
  $text = ""
  If not IsArray($array) Then
    return $text
  Local $i
  For $i = 0 to UBound($array) - 1
    $text = $text & $array[$i] & $pad
  If StringLen($pad) > 0 Then
    $text = StringTrimRight($text, StringLen($pad))
  return $text
Edited by GrahamS


Link to post
Share on other sites

10x Grahams,

It's kind of complicate, though.  :whistle:

I thought there is a way to display the content by using something like that:

Msgbox (0,"",$Myarray)

Yep it is kinda complicated, but its written as a UDF so that that you can just cut and paste it wherever you need it B)

And sorry, don't know of any short circuit :angry:


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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...