G grgczyz Member Licensed User Jul 1, 2011 #1 Hi, Does anyone know how to declare a two dimensions array of eg. integer numbers in B4A? In basic4ppc there was s.th like this: Dim dane11(0,0) dane11() = Array ((0, 0, 0, 0, 0, 0, 6), _ (1, 1.5, 14.5, 13.5, 18.5, 17, 8), _ (8, 240, 0, 0, 2640, 2400, 0)) Please help me. Greetings, Greg
Hi, Does anyone know how to declare a two dimensions array of eg. integer numbers in B4A? In basic4ppc there was s.th like this: Dim dane11(0,0) dane11() = Array ((0, 0, 0, 0, 0, 0, 6), _ (1, 1.5, 14.5, 13.5, 18.5, 17, 8), _ (8, 240, 0, 0, 2640, 2400, 0)) Please help me. Greetings, Greg
K kickaha Well-Known Member Licensed User Longtime User Jul 1, 2011 #2 The Array keyword only supports single dimension arrays, for multi-dimensions you would have to set the values seperately AFAIK. Upvote 0
The Array keyword only supports single dimension arrays, for multi-dimensions you would have to set the values seperately AFAIK.
G grgczyz Member Licensed User Jul 2, 2011 #3 Is there any way to use directly multi-dimension arrays in B4A? Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Jul 3, 2011 #4 You can use multi-dimension arrays. However the Array keyword cannot be used with multi-dimension arrays. Upvote 0
You can use multi-dimension arrays. However the Array keyword cannot be used with multi-dimension arrays.
G grgczyz Member Licensed User Jul 3, 2011 #5 So then .... what keywards should I use to declare and use multidimension arrays like I did in B4ppc? Upvote 0
So then .... what keywards should I use to declare and use multidimension arrays like I did in B4ppc?
Erel B4X founder Staff member Licensed User Longtime User Jul 3, 2011 #6 B4X: Dim arr(10,10,10,10) as Int arr(2,3,4,5) = 56 arr(0,0,0,0) = 1212 Upvote 0
Cableguy Expert Licensed User Longtime User Dec 11, 2011 #7 Would in this case the use of a variable be possible? something like_ B4X: Dim Prod( Vilalist.count,4) as int n= 2 Prod(Vilalist.get(n),2) = 100 Upvote 0
Would in this case the use of a variable be possible? something like_ B4X: Dim Prod( Vilalist.count,4) as int n= 2 Prod(Vilalist.get(n),2) = 100