• 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. What is the difference between ~> and ->

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 143
  • Views 5745
  • 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

What is the difference between ~> and ->

howardhaoracle
howardhaoracle over 12 years ago

Hi.. 

Please explain the difference between using ~> and ->  ?? When do you use ~>  or ->?

I looked at some Skill codes and I see both are used

 Thanks for your explanation..

Howard

 

  • Cancel
Parents
  • skillUser
    skillUser over 12 years ago

     Hi Howard,

    The basic answer is that "~>" should be used for database objects (and CDF, techfiles, constraints...) whereas the "->" operator is for "everything else" such as windows, menu structures, form structures, disembodied property lists, tables etc.  Often they can be used interchangeably but with one big difference: the ~> operator can handle a list on its left hand side (input) and expand the query for each of the elements on the left.  Here's a brief example:

    cv = geGetEditCellView()
    cv~>nets
    => (db:0x16fcba12 db:0x16fcba13 db:0x16fcba14 db:0x16fcba15 ...)
    cv~>nets~>name
    => ("Out" "net9" "A" "vss!" "B" ...)
    

    In the example the second ~> (in red) has a list as its input and it queries the "name" attribute for each of the members and returns the list of results.  If you tried "->" for the second query ("name") it will return nil, but if you used it for the "cv~>nets" query it would work since there is only one thing in its input on the left.

    Hopefully this clarifies the main differences.  Generally speaking you should use the "~>" for database objects, techfile access, constraint object access and so on, and use "->" for everything else.

    Regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • skillUser
    skillUser over 12 years ago

     Hi Howard,

    The basic answer is that "~>" should be used for database objects (and CDF, techfiles, constraints...) whereas the "->" operator is for "everything else" such as windows, menu structures, form structures, disembodied property lists, tables etc.  Often they can be used interchangeably but with one big difference: the ~> operator can handle a list on its left hand side (input) and expand the query for each of the elements on the left.  Here's a brief example:

    cv = geGetEditCellView()
    cv~>nets
    => (db:0x16fcba12 db:0x16fcba13 db:0x16fcba14 db:0x16fcba15 ...)
    cv~>nets~>name
    => ("Out" "net9" "A" "vss!" "B" ...)
    

    In the example the second ~> (in red) has a list as its input and it queries the "name" attribute for each of the members and returns the list of results.  If you tried "->" for the second query ("name") it will return nil, but if you used it for the "cv~>nets" query it would work since there is only one thing in its input on the left.

    Hopefully this clarifies the main differences.  Generally speaking you should use the "~>" for database objects, techfile access, constraint object access and so on, and use "->" for everything else.

    Regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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