[Gambas-user] About help and arrays and variables

Demosthenes Koptsis demosthenesk at ...626...
Wed Nov 17 18:30:49 CET 2010


Can someone explain embedded arrays further?

i understand nothing.

i know what a normal array is and that it can be static or dynamic.

But "embedded arrays are just a way to access a part of a Gambas object"

for example i have a TextBox1 how can i use an embedded array on it?

You mean do use the TextBox1 as an array..? For example to enumerate its
properties? i cant think what do you mean.

If there is an example to demonstrate the differences. Please.



On Wed, 2010-11-17 at 12:49 +0100, Benoît Minisini wrote:
> > in http://gambasdoc.org/help/lang/arraydecl?show
> > 
> > the syntax for Embedded arrays is
> > 
> > [ STATIC ] { PUBLIC | PRIVATE } Identifier [ Array dimensions ... ] AS
> > Native Datatype
> > 
> > but i could use also the NEW keyword
> > 
> > For example
> > 
> > PUBLIC aNames AS NEW String[2, 2]
> 
> That is a different thing.
> 
> 	PUBLIC aNames AS New String[2, 2]
> 
> Is the same thing as:
> 
> 	PUBLIC aNames As String[]
> 	aNames = New String[2, 2]
> 
> Where as:
> 
> 	PUBLIC aNames[2, 2] As String
> 
> Is an embedded array.
> 
> "Normal" arrays are true Gambas objects, whereas embedded arrays are just a 
> way to access a part of a Gambas object as an array. The array contents is 
> stored in the memory slot allocated to the Gambas object where it is declared.
> 
> Regards,
> 

-- 
Regards,
Demosthenes Koptsis.





More information about the User mailing list