[Gambas-user] Arrays?
Benoit Minisini
gambas at ...1...
Wed Nov 21 17:47:43 CET 2007
On mercredi 21 novembre 2007, smiefert at ...784... wrote:
> hello,
>
> when i set an arry like this
>
> DIM myArray AS New Integer[27][9]
>
> how can i set or get an arrayelement
>
> myArray[0][1] = "Hello"
> message.info(myArray[0][1])
>
> dosent work. i get alwys the error
>
> Bad number of dimensions
>
> what is wrong?
This: DIM myArray AS New Integer[27][9]
The syntax is not correct. But the message you get is not the good one.
With a version of Gambas more recent than 1.9.43, you will get a syntax error.
The correct syntax is:
DIM myArray AS New Integer[27,9]
Regards,
--
Benoit Minisini
More information about the User
mailing list