• 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. taking list and strings as a input

Stats

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

taking list and strings as a input

SureshT
SureshT over 2 years ago

Hello all, 

I am new to SKILL. And I want to take list and strings as an input from a user and sort it.

Please guide me, If any functions or procedures are available.

I am using Virtuoso 6.1.7 64b version

  • Cancel
Parents
  • RobMan
    RobMan over 2 years ago

    The 'sort' function is probably your best starting point...

        Cadence SKILL Language Reference -- sort

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • RobMan
    RobMan over 2 years ago

    The 'sort' function is probably your best starting point...

        Cadence SKILL Language Reference -- sort

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • SureshT
    SureshT over 2 years ago in reply to RobMan

    How to take list as a input from user? 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • SureshT
    SureshT over 2 years ago in reply to SureshT

    Thank you for your quick reply

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • AaronSymko
    AaronSymko over 2 years ago in reply to SureshT

    The most common way is to use a Form with a string field, in which each item is space or comma separated.  For example:


    procedure( GetStringAsList()
      let((stringField topLayout formId)
        stringField = hiCreateStringField(
          ?name 'stringField
          ?prompt "Enter Strings:"
          ?value ""
        )
        topLayout = hiCreateFormLayout('topLayout
          ?items list(stringField)
        )
        formId = hiCreateLayoutForm('TheForm "Input String(s)" topLayout
          ?callback 'GetStringAsListCB
          ?buttonLayout 'OKCancelDefApply
          ?unmapAfterCB t
          ?dialogStyle 'modal
        )
        hiDisplayForm(formId)
        ;; Return the list
        formId->sortedList
      ); let
    ); procedure
    
    
    procedure( GetStringAsListCB(formId)
      let((stringVal sortedList)
        stringVal = formId->stringField->value
        if(blankstrp(stringVal) then
          hiHighlightField(formId 'stringField 'error)
          hiSetCallbackStatus(formId nil)
        else
          sortedList = sort(parseString(stringVal " ,:") 'alphalessp)
          info("Sorted List = %L\n" sortedList)
          hiSetCallbackStatus(formId t)
        ); if
        formId->sortedList = sortedList
      ); let
    ); procedure
    
    sortedList = GetStringAsList()
    • Cancel
    • Vote Up +2 Vote Down
    • Cancel

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