|
-
Oct 30th, 2000, 08:17 PM
#1
Thread Starter
Lively Member
I want to do a Line Input after I found a certain word. So, if I found the word through a text file, I want to do the Line Input in the next line.
Any suggestion???
-
Oct 30th, 2000, 08:25 PM
#2
Code:
Open "C:\Textfile.txt" For Input As #1
Line Input #1, strLine$
Text1.text = Text1.text & strLine$
Close #1
That what you want?
-
Oct 30th, 2000, 08:32 PM
#3
Thread Starter
Lively Member
Thanks Matthrew but I already got that part.
Example of my text file
User1
User2
User3
User4
User5
User6
Beside using a loop going through each line, how can I get the line after I find User2. In this example, once I use instr to find "User2", it should return the next line which is "User3".
-
Oct 30th, 2000, 09:05 PM
#4
Thread Starter
Lively Member
Does anyone understand what I mean?
I want to find a word using instr function and get the next line of data. Is it possible to do a Line Input in the middle of the text file?
Thanks
-
Oct 30th, 2000, 09:21 PM
#5
transcendental analytic
It is of course, if you only know where to start reading, use seek statement and function to locate next position to read.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Oct 31st, 2000, 03:17 AM
#6
Thread Starter
Lively Member
That worked! Thanks.
What is the difference with these two?
Loc(1) & Seek(1)
What is the difference with these two?
Filelen and LOF(1)
[Edited by James Bond 007 on 10-31-2000 at 03:25 AM]
-
Oct 31st, 2000, 10:20 AM
#7
transcendental analytic
no diff between loc and seek functions
Filelen needs a filename and lof needs a open filenumber
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Oct 31st, 2000, 10:27 AM
#8
Lively Member
Another Difference
Filelen is used when the file is not open.
LOF only works if the file is open.
H.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|