[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gambas-user
Subject:    Re: [Gambas-user] Using a Struct
From:       Rolf-Werner Eilert <eilert-sprachen () t-online ! de>
Date:       2015-07-22 6:17:56
Message-ID: 55AF3594.4010404 () t-online ! de
[Download RAW message or body]

Tried to send you an answer, but it was bounced and after 4 days (read 
four days!) it came back to me this morning, so let me try if it is 
functionable again...

Rolf

Am 16.07.2015 17:56, schrieb Tobias Boege:
> On Thu, 16 Jul 2015, Rolf-Werner Eilert wrote:
>> Randall,
>>
>> Thank you for making that clear. Is it possible to make something like
>> an array out of a whole structure? What would this code look like?
>>
> Yes, you can use a Struct just as you use classes. I believe I sent you a
> link yesterday where derived arrays are explained :-) If you have any class
> (or Struct) MyClass in Gambas, you can use the identifier MyClass[] in your
> code and the interpreter will recognise this and create a class -- on the
> fly -- which represents an array of MyClass objects.
>
> So, if you have
>
>    Struct Hund
>      Wuff As String
>    End Struct
>
> you can have an array of Hunde via
>
>    Dim aHunde As New Hund[]
>
> I have also put the embedded array syntax into a new section in the Struct
> declaration wiki page[0]. Do you think it's better now?
>
> Regards,
> Tobi
>
> [0] http://gambaswiki.org/wiki/lang/structdecl
>
> PS: Randall, nice to see you around again :-)
>


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic