[Gambas-user] multidimensional array of integers

gaupe hennie at ...1826...
Tue Jan 15 02:12:45 CET 2008


thanks for  answering.
It does however not bring me much further as these are examples of fixed
arrays
and there is no sorting done in your example

most important for me is the sorting , not for a one dimensional but a 2
dimensional as shown in the starting
post
then i would like to have dynamicly add records to it.
perhaps you know how to do that too?
this is bothering me allready for weeks. ;-)  i feel real stupid not beeing
able to figure it out :-)


nando-7 wrote:
> 
> I use arrays heavily, both static and dynamic, both global and local
> 
> example:
> at the top of .class before any subs or functions:
> 
> PRIVATE xyz[13] AS Integer 'xyz[0] ... xyz[12]  are global to this .class
> PRIVATE abc[10,10] AS Integer  '2-D array 
> 
> 
> ---------- Original Message -----------
> From: gaupe <hennie at ...1826...>
> To: gambas-user at lists.sourceforge.net
> Sent: Mon, 14 Jan 2008 07:10:56 -0800 (PST)
> Subject: [Gambas-user]  multidimensional array of integers
> 
>> In some way i am not able to get how a multidimensional array in gambas
>> works
>> I have tried this in a hundred ways
>> it seems something soooo simple but i cant work it out....
>> 
>> What i want is
>> 
>> dim a as new integer[]
>> or .... dim a as new integer[1,2]     [0,0] doesnt seem to be allowed)
>> 
>> then insert elements
>> 
>> like a.add([1,5])   (but that does not function in this case....)
>> 
>> fill dynamic an array with an array of two integers
>> 
>> like
>> 
>> 1   5             ( this is the first element so print a[0,0],a[0,1] 
>> gives
>> 1 5
>> 2   4
>> 3   2
>> 4   6
>> 5   3
>> 6   1
>> 
>> then i want to sort the array so the second vertical row gets sorted and
>> the
>> first row comes with
>> after the sort then the array looks like this
>> 
>> 6  1
>> 3  2
>> 5  3
>> 2  4
>> 1  5
>> 4  6
>> -- 
>> View this message in context:
>> http://www.nabble.com/multidimensional-array-of-
>> integers-tp14803157p14803157.html Sent from the gambas-user mailing list
>> archive 
>> at Nabble.com.
>> 
>> -------------------------------------------------------------------------
>> Check out the new SourceForge.net Marketplace.
>> It's the best place to buy or sell services for
>> just about anything Open Source.
>> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
>> _______________________________________________
>> Gambas-user mailing list
>> Gambas-user at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
> ------- End of Original Message -------
> 
> 
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 
> 

-- 
View this message in context: http://www.nabble.com/multidimensional-array-of-integers-tp14803157p14823390.html
Sent from the gambas-user mailing list archive at Nabble.com.





More information about the User mailing list