[Gambas-user] Constants

Benoît Minisini gambas at ...1...
Mon Jul 20 10:34:34 CEST 2009


> Hello Benoît, Hello Gambas user,
>
> I am currently learning Gambas. The following program gives me a syntax
> error.
>
> ' Gambas module file
> CONST C AS Integer = 10000
> PUBLIC SUB Main()
>   DIM A[C] AS Integer
>   DIM B[C] AS Integer
> END
>
> Now obviously using a constant in an array does not work. My question
> now is: Is there a way around this.
> Or, could it be implemented? Or didn't I just get the point. In java it
> does work.
>
>
> Best Regards
>
> Johannes Frank
>
>

You must do that in Gambas:

Dim A As Integer[100]
Dim B As Integer[100]

Regards,

-- 
Benoît




More information about the User mailing list