Sign in to follow this  
Followers 0
Medic873

Converting Array To String

6 posts in this topic

I know there is a _ArrayToString

but im having trouble working it

I want to make

$aSplit[69]

into a string called $number1

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

#Include <Array.au3>
Dim $aSplit[2] = ["One","Two"]
$number1 = _ArrayToString($aSplit)
Would make $number1 contain "One|Two"

Edited by darkjohn20

Share this post


Link to post
Share on other sites

#include<Array.au3>

Dim $aSplit[69]
For $i=0 to 68 step 1
    $aSplit[$i] = $i
Next
$Number1 = _ArrayToString($aSplit, "|")
MsgBox(0, "", $Number1)

Try this it should demonstrate how to get it to work.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

#include<Array.au3>

Dim $aSplit[69]
For $i=0 to 68 step 1
    $aSplit[$i] = $i
Next
$Number1 = _ArrayToString($aSplit, "|")
MsgBox(0, "", $Number1)

Try this it should demonstrate how to get it to work.

_ArrayToString's second parameter defaults to "|" so it's not really necessary.

Same with "step 1"

Edited by darkjohn20

Share this post


Link to post
Share on other sites

_ArrayToString's second parameter defaults to "|" so it's not really necessary.

Same with "step 1"

Yea I know. I just like to specify those little things, Seems like it makes it easier to work with in the larger projects.

Share this post


Link to post
Share on other sites

You can open _ArrayToString function and modify it to suit your needs.

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