Re: [Vala] how to declare multi-dimensional arrays in Genie?

2010-07-16 Thread Ron Murawski
On 7/15/2010 7:34 PM, Jamie McCracken wrote: On Thu, 2010-07-15 at 19:26 -0400, Ron Murawski wrote: I wanted the multi-dimensional array in the data area, not on the stack. In C: int my_array[64][13]; int main(int argc, **char argv) { my_array[7][7] = 7; // more stuff return

Re: [Vala] how to declare multi-dimensional arrays in Genie?

2010-07-15 Thread Xavier Bestel
On Thu, 2010-07-15 at 11:52 +0200, Nicolas wrote: Hi Ron, Try this: const myarray : array of uint64 = {13, 64} Isn't this a mono-dimensional array with 2 elements ? Xav ___ vala-list mailing list vala-list@gnome.org

Re: [Vala] how to declare multi-dimensional arrays in Genie?

2010-07-15 Thread Nicolas
Isn't this a mono-dimensional array with 2 elements ? Xav Hi, I'm not an expert nor a real developer, but multidimensional array seem to be like this: var myarray = new array of uint64[3, 2] = {{13, 64}, {14, 65}, {15, 66}} or myarray : array of uint64[3, 2] = new array of

Re: [Vala] how to declare multi-dimensional arrays in Genie?

2010-07-15 Thread Ron Murawski
On 7/15/2010 6:23 AM, Nicolas wrote: Hi, I'm not an expert nor a real developer, but multidimensional array seem to be like this: var myarray = new array of uint64[3, 2] = {{13, 64}, {14, 65}, {15, 66}} or myarray : array of uint64[3, 2] = new array of uint64[3, 2] = {{13, 64}, {14, 65},

Re: [Vala] how to declare multi-dimensional arrays in Genie?

2010-07-15 Thread Robert Powell
Both of the above multi-dimensional array declarations work as intended, but they do not seem to be global. Is this what you are trying to do? int [,] arr; public void main(string [] args) { arr = new int[3,4]; arr[0,0] = 1; arr[1,1] = 2; stderr.printf(%d:%d\n, arr[0,0],

Re: [Vala] how to declare multi-dimensional arrays in Genie?

2010-07-15 Thread Jamie McCracken
On Thu, 2010-07-15 at 18:34 -0400, Ron Murawski wrote: On 7/15/2010 1:45 PM, Robert Powell wrote: Both of the above multi-dimensional array declarations work as intended, but they do not seem to be global. Is this what you are trying to do? int [,] arr; public void main(string []

Re: [Vala] how to declare multi-dimensional arrays in Genie?

2010-07-15 Thread Ron Murawski
On 7/15/2010 6:50 PM, Jamie McCracken wrote: On Thu, 2010-07-15 at 18:34 -0400, Ron Murawski wrote: On 7/15/2010 1:45 PM, Robert Powell wrote: Both of the above multi-dimensional array declarations work as intended, but they do not seem to be global. Is this what you are trying to do? int

Re: [Vala] how to declare multi-dimensional arrays in Genie?

2010-07-15 Thread Jamie McCracken
On Thu, 2010-07-15 at 19:26 -0400, Ron Murawski wrote: I wanted the multi-dimensional array in the data area, not on the stack. In C: int my_array[64][13]; int main(int argc, **char argv) { my_array[7][7] = 7; // more stuff return 0; } my_array is allocated on the