Results 1 to 24 of 24

Thread: Sorting a large text file ..... waves to Hack :)

Threaded View

  1. #1

    Thread Starter
    Frenzied Member TheBionicOrange's Avatar
    Join Date
    Apr 2001
    Location
    Cardiff, UK
    Posts
    1,818

    Resolved Sorting a large text file ..... waves to Hack :)

    Based on the other thread with the same name which is marked as reolved ...

    I'm now using this Quicksort routine to sort a text file thats nearly 2 meg in size.
    It contains fixed length records.
    I towkred before, but now the file is bigger I am getting "Input Past End Of File" error messages on the line of code highlighted below.
    Anyone know why ?

    VB Code:
    1. ' Now sort file into alphabetical order
    2.     Open "C:\att_value.txt" For Input As #1
    3.      [B]str1 = Split(Input$(LOF(1), 1), vbCrLf)[/B]
    4.     Close #1
    5.    
    6.     QuickSort str1, LBound(str1), UBound(str1)
    7.    
    8.     Open "C:\att_value.txt" For Output As #1
    9.      Print #1, Join(str1, vbCrLf)
    10.     Close #1
    Last edited by TheBionicOrange; Jan 25th, 2007 at 05:01 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width