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?
In the text doc. (en.txt) if you remove the comma then it prints
Yeah but i dont want to disallow the comma when i use this in my program.
What are you trying to do??? IF your trying to get it to say Hello, bob then put commas around the whole thing...
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.
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.
Quote:... Ok, my project shall be unveiled in a little while.
We'll all be waiting with bated breath! :wink:
*****
is it some super cool Win32 compiler for QB?
Maybe an e-greeting card