Jump to content

Array in return


HaxLi
 Share

Recommended Posts

$a = "1, 2, 3"
$aA = StringSplit($a, ", ", 1)
$b = $aA[1] & ", " & $aA[2] & ", " & $aA[3]

MsgBox(0, "abc", $b & " <-- this var works" & @CRLF & $aA & "<-- but don't know how to get the same value without $aA[1-3] -.-'")
;maybe there is something like StringSplit but in another way?oÝ÷ Øz0¶´
ëk+ÚçiÉ"ö«jÈ­Á«%G¢Múi¨r¢}ý¶X¤zØ^¶¬Á¬ºÚ"µÍÌÍØH  ÌÍØPVÌWH    [È ][ÝË  ][ÝÈ  [È ÌÍØPVÌH [È ][ÝË  ][ÝÈ  [È ÌÍØPVÌ×

I need to make this array variable like $aA[$i], thats why that $b above is not what I need..

Thank you for help if any

Friendly,

HaxLi

Edited by HaxLi
Link to comment
Share on other sites

  • Moderators

@Manadar - I'm sure what he posted was just an example of what he is trying to do. If you don't know how to accomplish what he is asking then thats fine, but don't make useless posts like your last one.

@HaxLi - Does this accomplish what you are wanting?

#include <Array.au3>

$sA = "1,2,3"
$aA = StringSplit($sA, ",")
_ArrayDisplay($aA, "$aA")
$sB = _ArrayToString($aA, ",", 1)
MsgBox(0, "", $sB)
Link to comment
Share on other sites

@Manadar - I'm sure what he posted was just an example of what he is trying to do. If you don't know how to accomplish what he is asking then thats fine, but don't make useless posts like your last one.

This was his question:

How to get Array value back in var as it was like in $a again?

It seems obvious to me that he would just need to use $a, and don't overwrite the previous value. So his question is pretty much pointless, that was what I was stating with 'lmao'.

Link to comment
Share on other sites

Does this accomplish what you are wanting?

Thank you for Code and realy nice help big_daddy!~.. that was what I wanted to do with it :]

$sB = _ArrayToString($aA, ", ", 1)

I realy appreciate your help.. and thanks for some more new code you teatched me here ;p

Manadar I know that $a == $a.. that was just an eg.. it's bcoz $a is default value, and I want to read values from some GUI I made and to write them back in ini file, which is created if filenotexist.. so I want to create changeable variable..

Sorry if my question sounded like stupid one ^^;

Best Regards,

HaxLi

Edited by HaxLi
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...