Newbie2 Posted February 17, 2004 Share Posted February 17, 2004 (edited) Hey (again) $NickLength=Random (1,12) Dim $NameArray [$NickLength] ;Nick loop For $nickLoop=0 to $NickLength-1 $myAsciiRandNickChar=Int (Random (20,126)) $NameArray [$nickLoop] = Chr($myAsciiRandNickChar) Next ;How to displaye a MsgBox with the antire content of the $NameArray array? 10x (again) Edited February 17, 2004 by Newbie2 Link to comment Share on other sites More sharing options...
GrahamS Posted February 17, 2004 Share Posted February 17, 2004 (edited) Try MsgBox(0,"", DisplayArray($NameArray, ",")) Func DisplayArray(ByRef $array, $pad) Local $text $text = "" If not IsArray($array) Then SetError(1) return $text EndIf Local $i For $i = 0 to UBound($array) - 1 $text = $text & $array[$i] & $pad Next If StringLen($pad) > 0 Then $text = StringTrimRight($text, StringLen($pad)) EndIf return $text EndFunc Edited February 17, 2004 by GrahamS GrahamS Link to comment Share on other sites More sharing options...
Newbie2 Posted February 17, 2004 Author Share Posted February 17, 2004 10x Grahams, It's kind of complicate, though. I thought there is a way to display the content by using something like that: Msgbox (0,"",$Myarray) Link to comment Share on other sites More sharing options...
GrahamS Posted February 17, 2004 Share Posted February 17, 2004 10x Grahams,It's kind of complicate, though. 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 And sorry, don't know of any short circuit GrahamS Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now