• 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
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    Hi Lior,

    I'm only teasing ;-)

    Obviously big languages like Tcl have the benefit of many more resources (such as stackoverflow) which help to answer such questions. However, this is one of those things that require your muscle memory to be trained when you're using a language - then they become natural.

    That said, a google search for "skill call function with list of arguments" finds (a handful of hits down) one of Jim's blogs

    Team SKILL
    SKILL for the Skilled: Part 2, Many Ways to Sum a List
    In the previous posting, SKILL for the Skilled: Many Ways to Sum a List (Part 1 ) , I showed a couple of ways to arithmetically sum up a given list of numbers. In particular, I presenting the following…
    By Team SKILL over 13 years ago in Cadence Blogs > Analog/Custom Design

    which mentions apply for this - in fact it's covered in more detail in part 1 (linked to from that, of course) which also leads to this general Wikipedia reference as apply is used in many languages based on lambda calculus.

    What's even more amusing is the reference to Tcl on that wikipedia page:

    Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    Hi Lior,

    I'm only teasing ;-)

    Obviously big languages like Tcl have the benefit of many more resources (such as stackoverflow) which help to answer such questions. However, this is one of those things that require your muscle memory to be trained when you're using a language - then they become natural.

    That said, a google search for "skill call function with list of arguments" finds (a handful of hits down) one of Jim's blogs

    Team SKILL
    SKILL for the Skilled: Part 2, Many Ways to Sum a List
    In the previous posting, SKILL for the Skilled: Many Ways to Sum a List (Part 1 ) , I showed a couple of ways to arithmetically sum up a given list of numbers. In particular, I presenting the following…
    By Team SKILL over 13 years ago in Cadence Blogs > Analog/Custom Design

    which mentions apply for this - in fact it's covered in more detail in part 1 (linked to from that, of course) which also leads to this general Wikipedia reference as apply is used in many languages based on lambda calculus.

    What's even more amusing is the reference to Tcl on that wikipedia page:

    Regards,

    Andrew

    • 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