Hi
I'm aware that once declared variables cannot be converted and that B4A tries to convert when assigned to each other. However, it mostly fails.
Reading data with the TextReader returns a string that, when assigned to a Double variable, throws a NumberFormatException. Example:
Is there any elegant way to accomplish this?
I'm aware that once declared variables cannot be converted and that B4A tries to convert when assigned to each other. However, it mostly fails.
Reading data with the TextReader returns a string that, when assigned to a Double variable, throws a NumberFormatException. Example:
B4X:
Dim gb, gl ,hg as Double
Sub GetLastLocation()
Dim Reader As TextReader
Reader.Initialize(File.OpenInput(File.DirInternal, "astrotime.ini"))
Dim line As String
line = Reader.ReadLine: gb = line
line = Reader.ReadLine: gl = line
line = Reader.ReadLine: hg = line
Reader.Close
End Sub
Is there any elegant way to accomplish this?