VB Code:
Dim FData() As String ReDim FData(0) As String ReDim FData(0, 0) As String FData(0) = "ABC"
Can't I put text in the first level of this multi-dimentional array?
Printable View
VB Code:
Dim FData() As String ReDim FData(0) As String ReDim FData(0, 0) As String FData(0) = "ABC"
Can't I put text in the first level of this multi-dimentional array?
Since you ReDimmed it to a two dimensional array...... you have to specify where the data goes. FData(0,0)
Wait a sec...
This isn't making sense to me!
In php you can assign data into FData[0]. I thought this would also be possible in VB! Because if I put FData[0,0] = "ABC", then FData[0] is empty. but i wanted to have a database structure type of multidimentional array!
VB Code:
Dim FData() As String FData(0) = "ABC" FData(1) = "DEF" FData(2) = "HIJ"
And so on, : Or am i loosin the point of what u wanna do, but u dont have to re-dim it,
Assumption incorrect :) (like that anyway)Quote:
Originally posted by INF3RN0666
In php you can assign data into FData[0]. I thought this would also be possible in VB!
Oh a little addition to wot i sed above:
VB Code:
Dim FData() As String FData(0) = "ABC" FData(1) = "DEF" FData(2) = "HIJ" ' Array's take up memory etc, so u need to erase it AFTER you are DONE ' IE: msgbox FData(0) Erase FData()
so i cant assign anything to the first level of the array? That's dumb if it's true!
You can do:
VB Code:
Dim Arr(5,1) As String Arr(0,0) = "ABC" Arr(0,1) = "DEF" Arr(1,0) = "HIJ" Arr(1,1) = "KLM" ' .......
how do u mean by "First Level"?Quote:
Originally posted by INF3RN0666
so i cant assign anything to the first level of the array? That's dumb if it's true!
VB Code:
FData() = Split("H E L L O"," ")
u can do that (im not certain if thats what u mean tho)