[Gambas-user] declaring user-defined datatype arrays as PUBLIC

Horst Geisler ho.geisler at ...17...
Thu Mar 3 22:06:34 CET 2005


Hey there
I have Problems with declaring user-defined datatype arrays as _PUBLIC_ 
in Gambas:

'#I have this user-defined datatyp
clBelegung.class:

Public  Name As String
Public  Zustand As boolean
---------------------------------------------------
'# and I declare in another global class File
_clGlobal.class:_
STATIC PUBLIC  Eingang AS NEW clBelegung[]
---------------------------------------------------
'#I want use it and its values in different modules like this:
_module1.module:_
DIM i as INTEGER
For i=1 to 7
   clGlobal.Eingang[i].Name ="&23" & i     
   clGlobal.Eingang[i].Zustand = True
Next
---------------------------------------------------
_module2.module:_
DIM i as INTEGER
For i=1 to 7
   Print clGlobal.Eingang[i].Name  & ":" & clGlobal.Eingang[i].Zustand
Next
---------------------------------------------------

If I 'run' this Gambas Project  I get the error messages like

'Arrays are forbidden here'  (STATIC PUBLIC  Eingang[] AS NEW clBelegung)
or
'Syntax error at line ...'  (STATIC PUBLIC  Eingang AS NEW clBelegung[])

Without declare as an Array it works, but not as Public! Array
if it is not possible in this way, what can I  do else?

Thanks a lot,
Horst
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20050303/ef701ae5/attachment.html>


More information about the User mailing list