• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. How to convert integer to string?

Stats

  • Locked Locked
  • Replies 18
  • Subscribers 148
  • Views 41360
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to convert integer to string?

latha
latha over 15 years ago

 Hi,

Can anybody let me know skill the function how to convert integer to string?

Ex: a=123 (integer)

I need

a="123" (string)

 

  • Cancel
  • jazzmatazz
    jazzmatazz over 9 years ago

    Hello all, good topic 

    I would like also to use a conversion of string to symbol in such a way but something is not ok.

           a=stringToSymbol("opt1")

           b=stringToSymbol("opt2")

                       hiGetCurrentWindow()->a->b

    The received value  is nil ... but should not be. ("opt1" and "opt2" are just for example)

    How I can perform this operation?

    Regards,

            Nikolay

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    Hi Nikolay,

    The -> operator does not evaluate the property name argument - it takes it literally. So this is looking for a property called "a" on the window, and then a property "b" on that.

    You'd have to use the get() function instead:

    get(get(hiGetCurrentWindow() a) b)

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • jazzmatazz
    jazzmatazz over 9 years ago

    Thanks Andrew,
          And what if the properties are in the body of the command 

                           a=stringToSymbol("property1")

                            b=stringToSymbol("property2")           

                               

                                   command(property1->property2)

    Regards,

              Nikolay

                  

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    Nikolay,

    I have no idea what you mean by "the properties are in the body of a command". Please give a real example - this is a bit abstract at the moment and it's hard to understand what you're asking.

    Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • jazzmatazz
    jazzmatazz over 9 years ago

    Actually now I realize that this is not property , but it's argument for the command.

    The command is with syntax 

                                        command(property1->property2)

     The question is how I can build this argument for proper evaluation 

                                   a=stringToSymbol("property1")

                                   b=stringToSymbol("property2")    

                                               command(a->b)

    And probably this question have to be moved to another topic :)

    Regards,

              Nikolay

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    Nikolay,

    Your question still doesn't really make sense - it's still too abstract - but as a wild guess, maybe you want:

    command(get(symeval(a) b))

    Unless you give a real example though, I'm just stabbing in the dark here.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • jazzmatazz
    jazzmatazz over 9 years ago

    Andrew,

       It's not needed to give you examples for the current issue, even with such abstracts description you managed to understand what I probably mean.

       Your proposal works perfect. Thanks!

    Regards,

              Nikolay

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • theopaone
    theopaone over 9 years ago

    As Andrew pointed out, the dash-arrow operator represents the get function. Your command string should be:

    command( get(a b))

    This will execute on the values of a and b rather than on a and b itself.

    Ted

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
<

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information