Fwd: Re: [Gambas-user] How to redim an array of Float

Fabien Gambasfr at ...11...
Mon Apr 7 22:21:50 CEST 2003



----------  Message transmis  ----------

Subject: Re: [Gambas-user] How to redim an array of Float
Date: Mon, 7 Apr 2003 22:20:54 +0200
From: Fabien <Gambasfr at ...11...>
To: gambas-user at lists.sourceforge.net

Le Lundi 7 Avril 2003 19:00, David Campillo a écrit :
> Hello,
>
> How to redim a array of float ?
>
> 	redim MyFloatarray(10) don't work

MyFloatarray.Resize (10)

> Thanks...
>
> David
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: ValueWeb:
> Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
> No other company gives more support or power for your dedicated server
> http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user

Ouhaou  There is lot of work to teach you Gambas is not vb ... lol

Array is a class

You can have information about it on the object explorer

there is lot of apply for array

first you must to declare what type of array you want to use
Integer[]
Object[]
String[]
Float[]
or Object[]
or a more generic one : Variant[]


so now.....

A classic déclaration :

Dim MyArray as New Integer[]
' in Gambas Dim is not a necessity
so MyArray[10] = 3 for exemple
You can type
MyArray as New Integer[]

to make an array class who content other array class
-> don't forget 'New ' because it's a CLASS and you must to instanciate it
MyArray as New Integer[]

SubArray as Integer[] -> here the array don't exist ...just the type is
initialized

i as Integer
MyArray.Resise(10)    -> it's like in vb Redim preserve MyArray(10)

For i = 1 to MyArray.Count - 1
SubArray = New Array   ->here i instantiate a pointer to a new array
MyArray.add(SubArray)
next


Test all of this and tell me if you understand...
If no Write to me in french i'm better in it

Fabien

-------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: David.tar.gz
Type: application/x-tgz
Size: 1068 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20030407/69c35b9d/attachment.bin>


More information about the User mailing list