Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

vb arrays

Name: Anonymous 2008-11-20 15:19

hey /prog/, I only started programming a couple months ago, so sorry for being a complete noob, but in VB 2008 can I read a file with io.streamreader, and sort every other line alphabetically? ie. name data name 2 data 2 names alphabetically keeping data in order thanks, in return I offer my gratitude

Name: Anonymous 2008-11-20 15:26

No, sorry. Use a real language.

Name: Anonymous 2008-11-20 15:26

Read SICP.

Name: Anonymous 2008-11-20 15:34

Name: Anonymous 2008-11-20 15:47

i can't answer your question unless you provide me with more information

1. Does the sort need to be in place?
2. Are the lines of the text file from user input?
3. what is the encoding of the text file?

clearly you have no grasp on your problem

Name: Anonymous 2008-11-20 15:57

clearly you have no grasp on your problem

This.

Name: Anonymous 2008-11-20 15:59

>>5
on your problem
your

Name: Anonymous 2008-11-20 17:08

1)in place? it just needs to be sorted alphabetically, with the corresponding data still with the name it was originally with.
2)no, from a .txt
3)Its just a .txt, no encoding

Name: Anonymous 2008-11-20 17:24

>>7
What's your problem?

Name: 5 2008-11-20 17:28

>>8
1)in place? it just needs to be sorted alphabetically, with the corresponding data still with the name it was originally with.
You don't know what `in place' means.

3)Its just a .txt, no encoding
There's no such thing as `just a .txt', as far as programming is concerned. If the file is not just a sequence of random bytes, there is some encoding.

Also, drop VB and read SICP now].

Name: Anonymous 2008-11-20 18:32

Use a List of KeyValuePairs of String, String. Read the first line and use as a key, then read the second line and use as the value. Add to the list. Repeat until the end of the file.

Then sort the list using its built in method, specifying a comparer function that compares just the keys of the KeyValuePairs.

Now do whatever you needed to do with that sorted list .. print it, write it back to a file, etc.

Name: Anonymous 2008-11-20 21:40

Sage. Also DON'T FUCKING HELP HIM

Name: Anonymous 2008-11-20 22:21

>>11
DON'T HELP HIM!

Name: Anonymous 2013-10-07 3:48

When I was 5 years old I ducked a fuck and I bumped a thread :(

Name: Anonymous 2013-10-07 4:07

>>12,13
Grow up, nigger.

Name: Anonymous 2013-10-07 4:18

>>12
>le pedophile sage

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List