Liberty BASIC Community Forum
« dynamic array + sort »

Welcome Guest. Please Login or Register.
Sep 21st, 2017, 11:36pm


Rules|Home|Help|Search|Recent Posts|Notification


« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: dynamic array + sort  (Read 277 times)
bluatigro
Guru
ImageImageImageImageImage


member is offline

Avatar

cxiu diversas el tio respondas cxiu samvaloras [ thats esperanto for : we are al different therefore we are al equal ]


PM

Gender: Male
Posts: 908
xx dynamic array + sort
« Thread started on: May 11th, 2017, 08:16am »

i wood like to do this :
Code:
ddim a( 2 )

dadd( a , 2 , 3 , 4 )
''or
a[0]={ 2 , 3 , 4 }
''etc...

for i = 0 to size( a )
  for j = 0 to dims( a )
    print a[ i , j ] ;
  next j
  print
next i

dsort( a[] , 1 )

dshuffle( a[] )

ddim b( 3 ) 
b[] = part( a[] , begin , end )
''or
b[] = a[] + a[]
b[] = a[] * 5

remove( a[] , 2 )

function q[]( a[] , b[] )

swap a[1] , a[2]

''ect...
 


i can do this all whit a string but that is verry slow
« Last Edit: May 11th, 2017, 08:26am by bluatigro » User IP Logged

basic's : C64 Simons C128 Amiga Amos quick4.5 Visual5 Visual6 Visual2005 Visual2008 just and last but not least liberty
CarlGundel
Administrator
ImageImageImageImageImage


member is offline

Avatar

author of Liberty BASIC


Homepage PM


Posts: 2833
xx Re: dynamic array + sort
« Reply #1 on: May 12th, 2017, 8:59pm »

Okay, could you explain what you would like? Your example is unclear to me.

Thanks,

-Carl
User IP Logged

author of Liberty BASIC
http://www.libertybasic.com
Stefan Pendl
Global Moderator
ImageImageImageImageImage


member is offline

Avatar

Computers are like babies, you must teach them what you like them to do ...


Homepage PM

Gender: Male
Posts: 5295
xx Re: dynamic array + sort
« Reply #2 on: May 13th, 2017, 04:21am »

I think he wants something like ArrayList in C# or List(Of ...) in VB.NET
See List(Of <T>) Class at MSDN.
« Last Edit: May 13th, 2017, 04:21am by Stefan Pendl » User IP Logged

Stefan

Make sure to read and follow the Forum Guidelines

Liberty BASIC Pro 4.04, Windows 10 Professional x64, Intel Core i7-4710MQ 2.5GHz, 16GB RAM
Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Rules|Home|Help|Search|Recent Posts|Notification

Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls