• 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. Allegro X PCB Editor
  3. How to get the maximum item in a nonnumerical list

Stats

  • Replies 8
  • Subscribers 158
  • Views 14849
  • Members are here 0
More Content

How to get the maximum item in a nonnumerical list

archive
archive over 17 years ago

I got a package_height_max property list, and converted it to a short list like below:

HeightList = list("1.6 MM" "1.2 MM" "1 MM" "2.4 MM" "1.5 MM"
    "0.55 MM" "0.7 MM" "3.85 MM" "2.6 MM" "0.1 MM"
    "0.8 MM" "2.1 MM" "2.61 MM" "11.75 MM" "11.7 MM"
    "7.25 MM" "1.1 MM" "1.3 MM" "10 MM" "11 MM"
    "1.27 MM" "6 MM" nil "13.5 MM")


How to get the maximum height value?

I can get each height value one by one, but can't treat with a list .
i.e.
car(parseString(nth(1 HeightList))) -->"1.2"

mapcar(lambda( (x) car(parseString(x))) AllHeight)
E- *Error* parseString: argument #1 should be either a string or a symbol (type template = "SS") - nil

Anybody share me the soultion? Thanks.


Originally posted in cdnusers.org by leonlee
  • Sign in to reply
  • Cancel
Parents
  • archive
    archive over 17 years ago

    To fix an error:
    mapcar(lambda( (x) car(parseString(x))) AllHeight)
    is:
    mapcar(lambda( (x) car(parseString(x))) HeightList)[b] [/b]


    The forum can support modifying post~~


    Originally posted in cdnusers.org by leonlee
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • archive
    archive over 17 years ago

    To fix an error:
    mapcar(lambda( (x) car(parseString(x))) AllHeight)
    is:
    mapcar(lambda( (x) car(parseString(x))) HeightList)[b] [/b]


    The forum can support modifying post~~


    Originally posted in cdnusers.org by leonlee
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
Cadence Guidelines

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