change text to number

Viewing 1 reply thread
  • Author
    Posts
    • #3715
      dylan peng
      Participant

      Hi, i am very new to gdl. currently i have had a parameter called scale which is a text type parameter so that i can input the scale like 1/50. but how to change string 1/50 to number 1/50. i know SPLIT is the function i am looking for. But anyone can help the script to make it work? Thanks a lot!

      DRAGONFLY44

    • #3717
      Denny Wong
      Participant

      Hi there,

      Here’s a sample:

      n = split("1/50", "%n%s%n", j,k,l)
      print "Scale is ", j, " to ", l, " or ", j*2, " to ", l*2, " if you are really mad"
      • #3719
        dylan peng
        Participant

        Hi Denny,

        thanks a lot!

        DRAGONFLY44

Viewing 1 reply thread
  • The forum ‘Informations from the environment’ is closed to new topics and replies.