X
X
XOM91K2021-11-03 19:30:10
Visual Basic
XOM91K, 2021-11-03 19:30:10

Visual Basic - why is the line from the .txt file not being read completely?

Hello!

Open "C:\my\my.txt" For Input As #2
    Dim getDublicateColumn As String
    Input #2, getDublicateColumn
    Close #2

There is a line in the my.txt file " 1 will fall out - Yes (cf. 5.90) ​​"
why this code writes to the getDublicateColumn variable only part of the line from the file, namely " 1 will fall out - Yes (cf. 5 "
The screenshots below show everything by debug:
2QXhGP6.png
mETZpGI.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg, 2021-11-03
@402d


why does this code write to the getDublicateColumn variable only part of the line from the file,

Note
Input The function is not localized. For example, in the German version, if you enter 3, 14159 only returns 3 because the comma is treated as a variable separator and not as a decimal point.
The documentation says that the comma is a variable separator.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question