05-08-2004, 05:45 AM
ok here is the question.. im working on trying to figure out a sort routine were the code will sort my txt file of names by last name.
I try the the line
Print Mid$(presname$(i)) but get errors.. can you tell me why it does that. I know it is somewhere with that line but not sure why..
I try the the line
Print Mid$(presname$(i)) but get errors.. can you tell me why it does that. I know it is somewhere with that line but not sure why..
Quote:CLS
PRINT TAB(60); "*"
PRINT TAB(60); "*"
DIM presname$(0 TO 42)
OPEN "f:/pres.txt" FOR INPUT AS #1
DIM index
INPUT #1, presname$(index)
DO WHILE NOT EOF(1)
index = index + 1
INPUT #1, presname$(index)
LOOP
FOR i = 0 TO 42
PRINT presname$(i)
NEXT i
OPEN "f:/output.txt" FOR OUTPUT AS #2
FOR i = 0 TO 42
PRINT #2, presname$(i)
NEXT i