V
veens-zevenhonderdvijf
Hi,
In the past year I've been working more and more with visual basic (VB)
and less with turbo pascal (TP). There is however one thing I have not
discovered how to do with VB that I could certainly do with TP:
How to read from a file a character that has the ascii-number 10 or 13.
VB just skips it when I use code like below. It sees it as the end of a
line but I want VB to read all characters.
Can anybody tell me how to do this?
Sub ReadTestFile()
Dim Counter as long
Dim Character (1 to 1000) as String * 1
Open "C:\TEST\test.dat" For Input As #1
Line Input #1, ReadString
Counter = 1
While Not( (Len(ReadString) = 0) or (Counter > 1000) )
Character(Counter) = Asc(Left(ReadString, 1))
ReadString = Right(InleesStr, Len(ReadString) - 1)
Counter = Counter + 1
Wend
end sub
regards: Jan Veenstra
In the past year I've been working more and more with visual basic (VB)
and less with turbo pascal (TP). There is however one thing I have not
discovered how to do with VB that I could certainly do with TP:
How to read from a file a character that has the ascii-number 10 or 13.
VB just skips it when I use code like below. It sees it as the end of a
line but I want VB to read all characters.
Can anybody tell me how to do this?
Sub ReadTestFile()
Dim Counter as long
Dim Character (1 to 1000) as String * 1
Open "C:\TEST\test.dat" For Input As #1
Line Input #1, ReadString
Counter = 1
While Not( (Len(ReadString) = 0) or (Counter > 1000) )
Character(Counter) = Asc(Left(ReadString, 1))
ReadString = Right(InleesStr, Len(ReadString) - 1)
Counter = Counter + 1
Wend
end sub
regards: Jan Veenstra