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



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], arr[1,1]);
}

Hope that helps


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]