473,396 Members | 2,154 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Sorting an array

Hello all,

I am trying to help a fellow working with a VB6.NET project and am having
trouble.

The exercise wants us to read some words in English, German and French into
an array from a text file, which I got working fine.

But now it wants us to sort the array by the English words, and I would
assume the German and French equiviliant as well.

I have never sorted in VB6 and was wondering if anyone could tell me how to
accomplish this. If you could provide a sample it would be greatly
appreciated.

Thanks in advance for your help,
John
Nov 21 '05 #1
7 1437
"John Conklin" <jo**********@cox.net> schrieb:
I am trying to help a fellow working with a VB6.NET project and am having
trouble.


VB6 or VB.NET?

For VB6, consider posting the question to one of the "microsoft.public.vb.*"
groups.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #2
> VB6 or VB.NET?

VB.NET

Thanks,
~John

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:eX**************@TK2MSFTNGP14.phx.gbl...
"John Conklin" <jo**********@cox.net> schrieb:
I am trying to help a fellow working with a VB6.NET project and am having
trouble.


VB6 or VB.NET?

For VB6, consider posting the question to one of the
"microsoft.public.vb.*" groups.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #3
Check out this page: http://www.vb-helper.com/tut1.htm

I'd suggest the selection sort. It is the shortest and easiest to use of the
ones presented.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"John Conklin" <jo**********@cox.net> wrote in message
news:eN**************@tk2msftngp13.phx.gbl...
Hello all,

I am trying to help a fellow working with a VB6.NET project and am having
trouble.

The exercise wants us to read some words in English, German and French into an array from a text file, which I got working fine.

But now it wants us to sort the array by the English words, and I would
assume the German and French equiviliant as well.

I have never sorted in VB6 and was wondering if anyone could tell me how to accomplish this. If you could provide a sample it would be greatly
appreciated.

Thanks in advance for your help,
John

Nov 21 '05 #4
"John Conklin" <jo**********@cox.net> schrieb:
VB6 or VB.NET?


VB.NET


Take a look at 'Array.Sort'. If you want to use a custom sorting criteria,
take a look here:

CompareOperator
<URL:http://dotnet.mvps.org/dotnet/samples/codingtechnique/CompareOperator.zip>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #5

"John Conklin" <jo**********@cox.net> wrote
I am trying to help a fellow working with a VB6.NET project and am having
trouble. But now it wants us to sort the array by the English words, and I would
assume the German and French equiviliant as well.

I have never sorted in VB6 and was wondering if anyone could tell me how to
accomplish this. If you could provide a sample it would be greatly
appreciated.

See if this will help you get started....
http://groups-beta.google.com/group/...5187401917dcf8

LFS
Nov 21 '05 #6

Ive noticed that google groups is super duper slow, taking about a day to
get replies, so if you post now, dont expect to see your post until
tomorrow, or for that matter, anyones answers to your post.

I just setup my wonderful Outlook Express news thing to the group specified
below, and answers appear instantly.

The array index, isnt the VB6 started at "1" and in the C languages it
starts with "0"?

So Id guess the VB.net also indexes arrays from the 0th operator? To
maintain compatability?

See if this will help you get started....
http://groups-beta.google.com/group/...5187401917dcf8
LFS

Nov 21 '05 #7
"Bradley1234" <so*****@yahoo.com> schrieb:
The array index, isnt the VB6 started at "1" and in the C languages it
starts with "0"?
In VB you could use an arbitrary start index.
So Id guess the VB.net also indexes arrays from the 0th operator? To
maintain compatability?


In VB.NET, indices of arrays start with 0. That's mainly for
interoperability (between different .NET programming languages) reasons, at
least according to Microsoft.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Paul Kirby | last post by:
Hello All I am trying to update me code to use arrays to store a group of information and I have come up with a problem sorting the multiple array :( Array trying to sort: (7 arrays put into...
7
by: Federico G. Babelis | last post by:
Hi All: I have this line of code, but the syntax check in VB.NET 2003 and also in VB.NET 2005 Beta 2 shows as unknown: Dim local4 As Byte Fixed(local4 = AddressOf dest(offset)) ...
3
by: SilverWolf | last post by:
I need some help with sorting and shuffling array of strings. I can't seem to get qsort working, and I don't even know how to start to shuffle the array. Here is what I have for now: #include...
7
by: Foodbank | last post by:
Hi everyone. I'm having trouble with this radix sorting program. I've gotten some of it coded except for the actual sorting :( The book I'm teaching myself with (Data Structures Using C and...
0
by: Brian Henry | last post by:
Here is another virtual mode example for the .NET 2.0 framework while working with the list view. Since you can not access the items collection of the list view you need to do sorting another...
7
by: Kamal | last post by:
Hello all, I have a very simple html table with collapsible rows and sorting capabilities. The collapsible row is hidden with css rule (display:none). When one clicks in the left of the...
5
KevinADC
by: KevinADC | last post by:
Introduction This discussion of the sort function is targeted at beginners to perl coding. More experienced perl coders will find nothing new or useful. Sorting lists or arrays is a very common...
1
KevinADC
by: KevinADC | last post by:
Introduction In part one we discussed the default sort function. In part two we will discuss more advanced techniques you can use to sort data. Some of the techniques might introduce unfamiliar...
5
by: lemlimlee | last post by:
hello, this is the task i need to do: For this task, you are to develop a Java program that allows a user to search or sort an array of numbers using an algorithm that the user chooses. The...
5
by: jrod11 | last post by:
hi, I found a jquery html table sorting code i have implemented. I am trying to figure out how to edit how many colums there are, but every time i remove code that I think controls how many colums...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.