• 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. SKILL equivalent of TCL "splatter" operator

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 143
  • Views 1830
  • 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

SKILL equivalent of TCL "splatter" operator

liorscotland
liorscotland over 9 years ago

Hello all. Let us assume the we have a list list1, of 2 elements. I need to feed those 2 elements as separate arguments to a proc, say proc1.
What that I would do in skill is:
proc1(   car(list1) cadr( list2  )
In TCL, I would do this:
proc1 [ lindex $list1 0] [lindex $list1 1]
or... Us the splatter operator:
proc1 {*}$list1
Naturally, the 2nd way is easier, and scalable, whereas the 1st way is not scalable, if proc1 can accept an arbitrary number of arguments.
Is there a way to achieve the same in SKILL?
Thanks.

  • Cancel
Parents
  • skillUser
    skillUser over 9 years ago
    Hi Lior,

    Interesting - I'm not familiar with the 'splatter' operator in Tcl (and I know Tcl pretty well), but the way to do this in SKILL is to use the apply function: apply('proc1 list1).

    E.g. apply('plus list(1 2 3)) => 6

    Hopefully this does what you want. BTW, I'm assuming that the 'list2' above is a typo.

    Best regards,
    Lawrence.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • skillUser
    skillUser over 9 years ago
    Hi Lior,

    Interesting - I'm not familiar with the 'splatter' operator in Tcl (and I know Tcl pretty well), but the way to do this in SKILL is to use the apply function: apply('proc1 list1).

    E.g. apply('plus list(1 2 3)) => 6

    Hopefully this does what you want. BTW, I'm assuming that the 'list2' above is a typo.

    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