Sign in to follow this  
Followers 0
duckblaster

.

5 posts in this topic

#1 ·  Posted (edited)

.

Edited by duckblaster

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Why not just make it a 2D array? like

$aArray[8] = StringSplit()
That way you can get the return values from StringSplit() like this
For $n = 0 To UBound($aArray[8])
MsgBox(48,"Values","The value stored in index " & $n & " is: " & $aArray[8][$n])
Next

Edited by dbzfanatic

Share this post


Link to post
Share on other sites

I have code that uses an array with text, boolean, int etc values, and want to add the return from StringSplit() to this array, but have problems, can anyone help me?

almost certainly

♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

Why not just make it a 2D array? like

$aArray[8] = StringSplit()
That way you can get the return values from StringSplit() like this
For $n = 0 To UBound($aArray[8])
MsgBox(48,"Values","The value stored in index " & $n & " is: " & $aArray[8][$n])
Next
That is not correct!

$aArray[8] = StringSplit() does not magically convert the array into having another dimension it just stores the array in that element.

The only way I know to store an array in an array element and then read it again is like this

Dim $aArray[10]
$aArray[8] = StringSplit("one|two|owls|sheep", "|")

$x = $aArray[8]
For $n = 1 To UBound($x) - 1
    MsgBox(48, "Values", "String " & $n & " in $aArray[8] is: " & $x[$n])
Next

@duckblaster. Can you tell us more about the structure of the array you want to add to?


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0