How to Convert Datatype STRING to FLOAT ?

Discussion in 'Questions' started by Mickego, Apr 16, 2011.

  1. Mickego

    Mickego Member Licensed User

    I have problems when reading Lat+Long from textfile,
    can not get them into Datatype FLOAT,
    to be used in GPS application.

    rgds Mickego
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Type conversion is done automatically as needed.
    Code:
    Dim f As Float
    f = 
    "1.2" 'f = 1.2
     
  3. Mickego

    Mickego Member Licensed User

    THX i tried it a lot of times
    finally found my problem,
    it was a wrongly parsed string from ini-file,
    a ~ was not filtered away :)
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    I highly recommend you to use File.ReadMap / File.WriteMap to save the configuration. It is very simple and reliable.
     

Share This Page

Loading...