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 :
count=1foreach(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 )
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.
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).