• 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. How to merge Tables?

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 143
  • Views 13987
  • 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

How to merge Tables?

Messi
Messi over 14 years ago

Hi,

  i have two tables say : my1[a][b] and another table my2[a][c]. I would like to merge these two tables so that my output looks like : ie new merged table be : my[a][b,c]. So that when i say my[a][b] it should have contents of my1[a] [b] and when i say my[a][c] i have contents of my2[a][c]. Is this possible?? Hope you all got my question.

Thanks,

Messi

                          

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 14 years ago

    Hi Messi,

    You've unfortunately just said the same thing you said before, without giving any more detail. Did my previous answer not solve the problem then?

    Perhaps if I illustrate with an example:

    my1=makeTable('myTable)
    my1['a]=makeTable('myTable)
    my1['a]['b]=makeTable('myTable)
    my1['a]['b][1]="hello"
    my1['a]['b][2]="world"
    my2=makeTable('myTable)
    my2['a]=makeTable('myTable)
    my2['a]['c]=makeTable('myTable)
    my2['a]['c][1]="testing"
    my2['a]['c][2]="123"

    then:

    my=makeTable('makeTable)
    my['a]=makeTable('makeTable)
    my['a]['b]=my1['a]['b]
    my['a]['c]=my2['a]['c]

    You can then do:

    my['a]['b][1] => "hello"
    my['a]['c][2] => "123"

    Regards,

    Andrew.

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

    Hi Messi,

    You've unfortunately just said the same thing you said before, without giving any more detail. Did my previous answer not solve the problem then?

    Perhaps if I illustrate with an example:

    my1=makeTable('myTable)
    my1['a]=makeTable('myTable)
    my1['a]['b]=makeTable('myTable)
    my1['a]['b][1]="hello"
    my1['a]['b][2]="world"
    my2=makeTable('myTable)
    my2['a]=makeTable('myTable)
    my2['a]['c]=makeTable('myTable)
    my2['a]['c][1]="testing"
    my2['a]['c][2]="123"

    then:

    my=makeTable('makeTable)
    my['a]=makeTable('makeTable)
    my['a]['b]=my1['a]['b]
    my['a]['c]=my2['a]['c]

    You can then do:

    my['a]['b][1] => "hello"
    my['a]['c][2] => "123"

    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