single foreach_in_collection loop to traverse through two sets of collections

Status
Not open for further replies.

snehal.saini

Newbie level 6
Joined
Oct 3, 2011
Messages
12
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,357
[Design Compiler] single foreach_in_collection loop for 2 sets of collections

I wanted to traverse through two sets of collections with a single foreach_in_collection. i wanted something like:

for (i=0;i<10;i++)
{
A = B;
}


A & B are the 2 collections i have.
Can anyone please help me to write a tcl script for this in Design Compiler?
 

Re: [Design Compiler] single foreach_in_collection loop for 2 sets of collections



Hai snehal.saini,
By changing the starting initialization and condition check in for use can get what u need from that list..

set a {}
set b { 1 2 3 4}
for { set i 0} {$i < [llength $b]} {incr i} {
lappend a [lindex $b $i]
}
puts $a

This may help u.....

- - - Updated - - -

By changing the starting initialization and condition check in for loop.... use can get the list value what u need from that list..
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…