|
-
September 15th, 2001, 11:05 AM
#1
Weird Problem with ReadAll method
Hi,
I wrote a simple function to read data from a text file:
Dim buffer as string
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile(filename, ForReading, -2)
buffer = f.Readall
f.Close
The weird thing is an extra newline character for every row of data is always added for no apparent reason. Example:
Source File:
123456
1234567890
Buffer: "123456nn1234567890" where n=newline character
Anybody know why?
Any input is greatly appreciated!
Rgs
WT
-
September 15th, 2001, 11:17 AM
#2
Re: Weird Problem with ReadAll method
Sorry, make a mistake, it problem should be extra space padded for every row of data.
Source:
123456
1234567890
buffer: "123456ns1234567890" where n=newline s=whitespace
Sorry about that.
WT
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
|