Benoit Minisini wrote:
>
> On dimanche 21 septembre 2008, Kari Laine wrote:
>> On Sun, Sep 21, 2008 at 8:16 PM, MaxVK <[EMAIL PROTECTED]> wrote:
>> > I am trying to create a multi dimensional array of string, the size of
>> > which
>> > is not known at design time.
>> >
>> > Iv spent some time today playing with this, but I cant seem to get it
>> to
>> > work at all. I did think that something like: DIM tArray AS
>> > String["","",""]
>> > would work, but its not right, and I cant work out what to try next.
>> >
>> > Iv seen some posts about creating a multi dimensional array of
>> integers,
>> > but
>> > those posts don't seem to help much with strings.
>> >
>> > Is this possible?
>> >
>> > Many thanks
>> >
>> > Max
>> >
>> > Hi Max,
>>
>> hopefully this example will help.
>> PUBLIC SUB Button1_Click()
>> DIM i AS Integer
>> DIM j AS Integer
>> DIM k AS Integer
>>
>> DIM MyArray[10, 10, 10] AS String
>>
>
> This syntax is deprecated: you should use
>
> DIM MyArray AS NEW String[X, Y, Z]
>
> The number of dimensions is fixed at compile time, but the dimension sizes
> can
> be any numeric expressions.
>
> Regards,
>
> --
> Benoit Minisini
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the
> world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
>
Ah thats it! Thanks Benoit. The dimension sizes can be passed as arguments
to a routine and I have what I needed.
regards
Max
--
View this message in context:
http://www.nabble.com/How-to-create-Multi-Dimensional-string-array-tp19596365p19596753.html
Sent from the gambas-user mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user