[Gambas-user] R: Struct declaration scope and array of Struct

Tobias Boege taboege at ...626...
Sat Jan 26 10:01:32 CET 2013


On Sat, 26 Jan 2013, Ru Vuott wrote:
> 
> > 
> > 1. Even if I declare a *Public* Struct, all other classes in
> > which I try to
> > ???use this Struct give me an error about an
> > unknown identifier. In what
> > ???regard is the Struct 'global'?
> > 
> 
> You have declare also "Public" the variable of relative Structure type.
> 
> Example.
> 
> ...
>
> Obviously, symbols of modules and Form controls have to be Public in the project.
> 

There is no variable involved. I declared a structure:

--[Class1.class]--
Public Struct Structure1
	A As Integer
End
------------------

as you can see, the identifier is public and now I want to use its
definition in Class2:

--[Class2.class]--
Private $s As Structure1
------------------

which gives me an "unknown identifier".

Regards,
Tobi




More information about the User mailing list