Thanks to “stanks”, who downloaded the book, started working with it, and encountered a problem related to a change in Gambas3. On the web page “Array Declaration“, note that “In Gambas 3, embedded arrays cannot be used as local variables anymore. But they can be public!“
Therefore, on page 54, when you are using Gambas3, the code should read:
Public narMatrix[3, 3, 3] As Integer
Public Sub Main()
Dim i As Integer
Dim ii As Integer
Dim iii As Integer
For i = 0 To 2
For ii = 0 To 2
For iii = 0 To 2
Print i, ii, iii & ” ==> “; ‘note that “;” prevents a newline.
narMatrix[i, ii, iii] = i * 9 + ii * 3 + iii
Print narMatrix[i, ii, iii]
Next
Next
Next
End
If you don’t make this change, you will get the error message “Embedded arrays are forbidden here in MMain.module“.
Also, note that declaring the array “PUBLIC” means that you don’t use the keyword DIM — “PUBLIC” automatically does the dimensioning .
Filed under: Comments/Questions


February 12, 2012 • 1:51 pm 5
Summary table for common Form Elements
Because I often forget which control is best for some purpose, I created a table of the Gambas3/Qt4/GTK+ Form Elements and I have added it to the Downloads widget, as download #5. Everyone should feel free to download this table, modify and translate it, and distribute it.
Best regards, minnesotajon
Filed under: Comments/Questions