• 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. can't reorganizing a list

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 143
  • Views 1973
  • 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

can't reorganizing a list

bloodwayn
bloodwayn over 14 years ago

 hi,

what could be the reason that the functions "reverse" and "sortcar" do not work?!

my list normally consist of other list elements which include parameters you can see in the two following codelines. 

pos = list(field_count xButtomLeft yButtomLeft xUpperRight yUpperRight)
l_pos = cons(pos l_pos)

the field_count is an integer starting at 0. the other values are coordinates of a rectangle.
these function is called multiple times. so at the end l_pos can looks like:

l_pos = ((4 7657.6 4641.6 8657.6 5527.0) (3 7657.6 3641.6 8657.6 4641.6) (2 7657.6 2641.6 8657.6 3641.6) (1 7657.6 1641.6 8657.6 2641.6))

now i need the list in inverse form. i try it with

a) reverse(l_pos) ... nothing has change

b) sortcar( l_pos ' lessp) ... the result is l_pos = ((4 7657.6 4641.6 8657.6 5527.0))

but if i transcribe the list into another like l_bla and apply the functions on the new list....it works.
i have no idea why it happens

regards,
philip

 

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

    "slow on the uptake" is correct English ;->

    I knew what you meant by "transcribe" - just not exactly how you'd done the transcription. I hope it wasn't a for loop, because that's not a good way of dealing with a list. It would have been OK if you'd done newList=foreach(mapcar item oldList item) or better still newList=copy(oldList) - but even then, I don't see how it would have fixed the problem!

    Regards,

    Andrew.

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

    "slow on the uptake" is correct English ;->

    I knew what you meant by "transcribe" - just not exactly how you'd done the transcription. I hope it wasn't a for loop, because that's not a good way of dealing with a list. It would have been OK if you'd done newList=foreach(mapcar item oldList item) or better still newList=copy(oldList) - but even then, I don't see how it would have fixed the problem!

    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