• 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. supressing part of the output of simple print statement

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 143
  • Views 12457
  • 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

supressing part of the output of simple print statement

malcolm70
malcolm70 over 4 years ago

Hello forum:  just wondering how to supress the display of the database key ids of the objects I print information about .

specifically, if I have a simple code structure at the CIW window :

instancelist=selectedSet()

count=1
foreach(instance instancelist printf("instance name : %s count of instances: %d \n" instance~>name count) count=count+1)

I get a list of instance names and count but at the end I get the long list of database key id's for what I assume is the instances.

How to supress the print of database ID"S ?  I ask because my instance list is long and I don't need that information now.

(using cadence 18 )

thanks.

  • Cancel
Parents
  • skillUser
    skillUser over 4 years ago

    Hi Malcolm,

    Just put a 't' (or 'nil') after the statement so that it is the last thing on the line and therefore will be the return value from the 'composite expression', i.e.

    count=1
    foreach(instance instancelist printf("instance name : %s count of instances: %d \n" instance~>name count) count=count+1) t

    In your case you could also just put "count" after the foreach statement to show the number of instances as the return value. Note that you don't need to do this within a script except for when you are trying to control the return value of a block (e.g. a procedure, let, if, etc. block of code where the return value might be passed into another function or stored).

    Best regards,

    Lawrence.

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

    Hi Malcolm,

    Just put a 't' (or 'nil') after the statement so that it is the last thing on the line and therefore will be the return value from the 'composite expression', i.e.

    count=1
    foreach(instance instancelist printf("instance name : %s count of instances: %d \n" instance~>name count) count=count+1) t

    In your case you could also just put "count" after the foreach statement to show the number of instances as the return value. Note that you don't need to do this within a script except for when you are trying to control the return value of a block (e.g. a procedure, let, if, etc. block of code where the return value might be passed into another function or stored).

    Best 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