dimitristsilis
New Member
Hello everyone! I'm using b4a trial 5.20.
The problem: I want to get the integer "2" from the first line of a .txt file, but...
If I write:
Everything is ok. If I write:
it throws an exception: java.lang.NumberFormatException: Invalid double: "2"
"2" is the number that the text file contains. There is only this number in the file, nothing else.
What could be the problem? Thanks for reading!
The problem: I want to get the integer "2" from the first line of a .txt file, but...
If I write:
B4X:
Dim number1 As Int
number1 = "2"
log(number1)
B4X:
Dim line As String
line = TextReader1.ReadLine
TextReader1.Close
Dim number1 As Int
number1 = line
log(number1)
"2" is the number that the text file contains. There is only this number in the file, nothing else.
What could be the problem? Thanks for reading!
Last edited: