Posts: 99
Threads: 20
Joined: Dec 2002
in this code
Code:
CLS
OPEN "C:\en.txt" FOR INPUT AS #1
INPUT #1, a$
CLOSE #1
PRINT a$
if en.txt contains
It will only have "Hello" how can i get past this?
Silent-Death
Unregistered
In the text doc. (en.txt) if you remove the comma then it prints
Posts: 99
Threads: 20
Joined: Dec 2002
Yeah but i dont want to disallow the comma when i use this in my program.
Silent-Death
Unregistered
What are you trying to do??? IF your trying to get it to say Hello, bob then put commas around the whole thing...
Posts: 6,419
Threads: 74
Joined: Mar 2002
Use LINE INPUT #1, a$ ... It comes in the almighty QB help
Code:
LINE INPUT # - a file I/O statement that reads an entire line without
delimiters from a sequential file to a string variable
Syntax
LINE INPUT #filenumber,stringvariable
â filenumber is the number of an open sequential file
â stringvariable will hold all characters from the sequential file
from the current position in the file up to, but not including, the
next carriage-return-line-feed sequence. No carriage-return-line-feed
sequences are ever input.
Posts: 99
Threads: 20
Joined: Dec 2002
Quote:Use LINE INPUT #1, a$ ... It comes in the almighty QB help
Thanks na_th_an that was just what i needed(+a little tweak)
Code:
OPEN fi$ FOR INPUT AS #1
fi$ = ""
DO
LINE INPUT #1, doot$
fi$ = fi$ + doot$ + CHR$(13)
LOOP UNTIL EOF(1)
CLOSE #1
Ok, my project shall be unveiled in a little while.
Posts: 1,956
Threads: 65
Joined: Jun 2003
Quote:... Ok, my project shall be unveiled in a little while.
We'll all be waiting with bated breath! :wink:
*****
Posts: 4,307
Threads: 63
Joined: May 2003
is it some super cool Win32 compiler for QB?
Posts: 199
Threads: 2
Joined: May 2003
Maybe an e-greeting card
url=http://www.spreadfirefox.com/?q=affiliates&id=60131&t=79]
[/url]
END OF LINE
.
Posts: 4,307
Threads: 63
Joined: May 2003