-
July 6th, 2009, 11:17 AM
#16
Re: How to read this paricular file entire contents????
I don't want to be too insistiv, but I just dug out QBasic this very minute.
It does NOT fall for it. I sure recall having used QBasic and also BasicA extensively and before that I used MBasic even on my very first CP/M computer. Line Input always was fine.
Oh, and I just found my VB4 and it seems to go without error.
I didn't check with a cchr$(0), though, but having no crlf at the end of file is no problem, also single cr or single lf are accepted.
-
July 6th, 2009, 12:02 PM
#17
Re: How to read this paricular file entire contents????
Well, it has been a long time since I have saw that error, but I have saw it many times most often because the last CRLF was not present in the file.
That said, don't confuse QBasic with Quick Basic as they are quite different.
The CHR(0) as I recall depends on what you do with the data, Placing it in a text box for example will not show anything after the Chr(0) as is the case with several other controls but this applies to a binary read as well.
Last edited by DataMiser; July 6th, 2009 at 12:05 PM.
-
July 6th, 2009, 12:08 PM
#18
Re: How to read this paricular file entire contents????
On another note it is possible that the OS has/had something to do with the error, these errors occured under dos/ win3.1/win95/98/me and if I recall correctly NT4. I do not recall ever seeing the error running under XP however, then again under XP I have not been using those languages.
-
July 6th, 2009, 12:12 PM
#19
Re: How to read this paricular file entire contents????
I also remember back in the day a misspelled variable could crash the system hard.
Say something like
MyNum=5
X=10/MyNumb
would give a message under Dos something like.
Division by Zero
System, Halted
Basically a BSOD only it was normally black
-
July 7th, 2009, 09:43 AM
#20
Re: How to read this paricular file entire contents????
That's rgiht, though. This division will also stop the VB6 code, although without crashing the system.
You are right about QBasic and Quick Basic. I tested QBasic.
Both tests, QBasic and VB4 I did yesterday were done on my old Win98 Machine I still have handy at the office. I can go and test QBasic and BasicA under MS-Dos 6.0, but I suppose they both will work ok with Line Input.
My test file has three lines. First is delimitet with a Cr only, second ends with a Lf only and third ends with no CrLf at all, but at end of file.
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
|