Professional Documents
Culture Documents
PrimeTime Suite Tool Commands - Foreach - in - Collection
PrimeTime Suite Tool Commands - Foreach - in - Collection
PrimeTime Suite Tool Commands - Foreach - in - Collection
You are here: PrimeTime Suite Man Pages > PrimeTime Suite Tool Commands > f >
foreach_in_collection
foreach_in_collection
NAME
SYNTAX
ARGUMENTS
DESCRIPTION
EXAMPLES
SEE ALSO
NAME
foreach_in_collection
SYNTAX
string foreach_in_collection
itr_var
collections
body
Data Types
itr_var string
collections list
body string
ARGUMENTS
itr_var
collections
body
DESCRIPTION
The foreach_in_collection command is used
to iterate over each element in a collection.
You cannot
use the Tcl-supplied foreach command to iterate over collections because the foreach command
requires a list, and a collection is not a list. Also,
using the foreach command on a collection causes
the collection to be deleted.
The arguments for the foreach_in_collection command parallel those of the foreach command: an
iterator variable, the collections over which to iterate, and the script to apply at each iteration. All
arguments are required.
https://spdocs.synopsys.com/dow_retrieve/qsc-t/dg/ptolh/T-2022.03/ptolh/Default.htm#manpages/pt2/foreach_in_collection.htm%3FTocPath%3D… 1/2
10/14/22, 3:03 PM PrimeTime Suite Tool Commands - foreach_in_collection
command1 $s
command2 $s
unset s
command1 $itr
command2 $itr
EXAMPLES
The following example from PrimeTime removes the wire load model from all hierarchical cells in the
current instance.
pt_shell> foreach_in_collection itr [get_cells *] {
? remove_wire_load_model $itr
? }
? }
SEE ALSO
collections(2)
https://spdocs.synopsys.com/dow_retrieve/qsc-t/dg/ptolh/T-2022.03/ptolh/Default.htm#manpages/pt2/foreach_in_collection.htm%3FTocPath%3D… 2/2