|
-
Feb 14th, 2000, 07:04 AM
#1
Thread Starter
Junior Member
The text file that i am inputing from looks like this
11111de|Machine|Whatever|ok
Open "TEXTFILE" For Input As #1
Input #1, line1
The string i get for line1 is 11111
The string that i want to get is (the whole line) 11111de|Machine|Whatever|ok
I know it probaly has something to do with the pipe character ("|") please help.
Mark
-
Feb 14th, 2000, 08:22 AM
#2
Hyperactive Member
Hi,
Try:
Line Input#1,line1
From Help.
Line Input # Statement
Reads a single line from an open sequential file and assigns it to a String variable.
Syntax
Line Input #filenumber, varname
The Line Input # statement syntax has these parts:
Part Description
filenumber Required. Any valid file number.
varname Required. Valid Variant or String variable name.
Remarks
Data read with Line Input # is usually written from a file with Print #.
The Line Input # statement reads from a file one character at a time until it encounters a carriage return (Chr(13)) or carriage return–linefeed (Chr(13) + Chr(10)) sequence. Carriage return–linefeed sequences are skipped rather than appended to the character string.
Al.
-
Feb 14th, 2000, 08:23 AM
#3
Member
hmmm not sure, but maybe try LINE INPUT #1, etc..(if that is even valid in VB... works in qbasic 
------------------
Rapmaster
-
Feb 14th, 2000, 08:23 AM
#4
Member
hehe Al... I guess we had the same idea 
------------------
Rapmaster
-
Feb 14th, 2000, 08:24 AM
#5
try the Line Input #1 statement instead
-
Feb 14th, 2000, 09:06 AM
#6
Member
hehe 3 people posting the same thing at the same time
------------------
Rapmaster
-
Feb 15th, 2000, 03:21 AM
#7
Thread Starter
Junior Member
Thanks i appreciate it.
Line Input works great........
Mark
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
|