For loops in Cadence

If one is doing an analysis over a range of variables, one should use the paramAnalysis ocean function. That said, I’m constantly having to look up how to do a for loop in Skill. So, I’m placing a couple examples where I know I can get to them.

Incrementing index:

for(i 1 10
print(i)
)

Run through a list:

myThings = list(1 2 3 4 “a” “B” “c”)
foreach(t myThings
print(t)
)

This entry was posted in Analog Professional and tagged , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

You must be logged in to post a comment.