Jump to content
Sign in to follow this  
Medic873

Converting Array To String

Recommended Posts

Medic873

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
darkjohn20

#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
fireryblaze

#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
darkjohn20

#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
fireryblaze

_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
Juvigy

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.