Home > Community > Forums > PCB SKILL > How can I convert from "Floating-point number" type to " string" type?

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 How can I convert from "Floating-point number" type to " string" type? 

Last post Fri, Feb 6 2009 7:36 PM by ELEKVN. 2 replies.
Started by ELEKVN 06 Feb 2009 12:47 AM. Topic has 2 replies and 2166 views
Page 1 of 1 (3 items)
Sort Posts:
  • Fri, Feb 6 2009 12:47 AM

    • ELEKVN
    • Top 100 Contributor
    • Joined on Mon, Dec 15 2008
    • Califonia, CA
    • Posts 70
    • Points 1,115
    How can I convert from "Floating-point number" type to " string" type? Reply

    Dear all,

    How can I convert from "Floating-point number" type to " string" type?

    I want to:

    strcat(text->text " " text->textBlock " " text->justify " " text->rotation ).

    But  " text->rotation" type is "Floating-point number", so I did not do it

    Can you help me change  " text->rotation" type is "Floating-point number" to "string" type

    Or can you give other idea to sole it

    Thank you

    Have nice weekend

    ELek

    luan.elek@yahoo.com.vn
    • Post Points: 20
  • Fri, Feb 6 2009 2:52 AM

    • Ejlersen
    • Top 10 Contributor
    • Joined on Mon, Jul 28 2008
    • Aalborg, Copenhagen
    • Posts 569
    • Points 10,080
    Re: How can I convert from "Floating-point number" type to " string" type? Reply

    Hi,

    You can use sprintf for this

    sprintf(string_variable "%f" text->rotation)

    That should do it.

    Best regards,

    Ole

    Best regards Ole
    • Post Points: 20
  • Fri, Feb 6 2009 7:36 PM

    • ELEKVN
    • Top 100 Contributor
    • Joined on Mon, Dec 15 2008
    • Califonia, CA
    • Posts 70
    • Points 1,115
    Re: How can I convert from "Floating-point number" type to " string" type? Reply

     Dear Ole,

    Thank for your answer, I could do it

    You are a goodman

    Have nice weekend,

    Elek

    luan.elek@yahoo.com.vn
    • Post Points: 5
Page 1 of 1 (3 items)
Sort Posts:
Started by ELEKVN at 06 Feb 2009 12:47 AM. Topic has 2 replies.