Results 1 to 4 of 4
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    TRIM AND REPLACE (6.0)

    I have this value ,34 i get with

    Replace(Trim(Sess0.SCREEN.GetString(X, 49, 16)), " ,", "0,")

    i have in other case always ,34 but i want 0,34...

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: TRIM AND REPLACE (6.0)

    What exactly is your question?

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: TRIM AND REPLACE (6.0)

    i wnt want to transform ,34 in 0,34

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: TRIM AND REPLACE (6.0)

    Since you have already trimmed the result, it won't begin with <code>" ,"</code>. Try this:
    <code>
    SomeVar = Trim(Sess0.SCREEN.GetString(X, 49, 16))
    If Left(SomeVar, 1) = "," Then
    SomeVar = "0" & SomeVar
    End If
    </code>
    If you already assign the value to a variable, use the name of that variable instead of SomeVar.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •