S sorex Expert Licensed User Longtime User Dec 14, 2014 #1 Hello, Is there a way predefine a multi dimentional array with some preset values without using code? I tried Code: Copy dim mda(8,8) as int mda=Array as int ( (0,0,0,0,0,0,0,0),(0,0,0,0,0,0,0,0),(0,0,0,0,0,0,0,0),(0,0,0,0,0,0,0,0),(0,0,0,0,0,0,0,0),(0,0,0,0,0,0,0,0),(0,0,0,0,0,0,0,0),(0,0,0,0,0,0,0,0)) but it doesn't seem to accept it.
Hello, Is there a way predefine a multi dimentional array with some preset values without using code? I tried Code: Copy dim mda(8,8) as int mda=Array as int ( (0,0,0,0,0,0,0,0),(0,0,0,0,0,0,0,0),(0,0,0,0,0,0,0,0),(0,0,0,0,0,0,0,0),(0,0,0,0,0,0,0,0),(0,0,0,0,0,0,0,0),(0,0,0,0,0,0,0,0),(0,0,0,0,0,0,0,0)) but it doesn't seem to accept it.
Erel B4X founder Staff member Licensed User Longtime User Dec 15, 2014 #2 No. The Array keyword creates single dimension arrays. You can however store the values in a text file and then read the file and fill the array. Upvote 0
No. The Array keyword creates single dimension arrays. You can however store the values in a text file and then read the file and fill the array.
S sorex Expert Licensed User Longtime User Dec 15, 2014 #3 What about a special keyword for this kind of thing? Array2 or MDArray ? I currently changed it to a single dimension with extra math to bypass the problem. Upvote 0
What about a special keyword for this kind of thing? Array2 or MDArray ? I currently changed it to a single dimension with extra math to bypass the problem.