[Gambas-user] multidimensional array of integers
ron
ronstk at ...239...
Tue Jan 15 07:25:34 CET 2008
On Tuesday 15 January 2008 02:12, gaupe wrote:
>
> 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 :-)
>
>
Sorting a One-Dimensional Array in gambas
http://gambasdoc.org/help/comp/gb/string[]/sort
----
Sorting a Two-Dimensional Array
Simple give code without explain why and how make no sense.
See following pages. There will be shown howto do it.
It is written for a alien basic ( :) ) but it show the
technics to use. The method is usable with gambas.
The article link is the explain for the method.
The demo link is a page with the code only, almost
ready to cut/paste for gambas.
Article:
Sorting a Two-Dimensional Array using a Bubble Sort
http://www.4guysfromrolla.com/webtech/011601-1.shtml
demo:
Two-Dimensional Array Sort Using Bubble Sort
http://www.4guysfromrolla.com/demos/2dsort.asp
Article:
Sorting a Two-Dimensional Array using a Bubble Sort, Part 2
http://www.4guysfromrolla.com/webtech/011601-1.2.shtml
demo:
Array of Objects Sorting Using Bubble Sort
http://www.4guysfromrolla.com/demos/objsort.asp
Ron
ps
'Response.Write' can replaced with 'Print'
LBound() and UBound() are the first and last index of in the array
use for LBound 0 and for UBound YourArray.Max
(http://gambasdoc.org/help/comp/gb/array/max)
More information about the User
mailing list