• 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 Scripting - Skill
  3. Issue with function @key parameters

Stats

  • State Suggested Answer
  • Replies 2
  • Answers 2
  • Subscribers 17
  • Views 88
  • Members are here 0
More Content

Issue with function @key parameters

DavidJHutchins
DavidJHutchins 1 day ago

I have noticed an issue with @key parameter default values not getting processed correctly...

Below is an example code segment:

procedure( test_code(
@key ( PseudoName "psuedo_tp")
( PreFix "_TP")
( Debug t)
)
let((Mark PreFix Comps net count Status)
when(Debug printf("PseudoName %A PreFix %A Debug %A\n" PseudoName PreFix Debug))
;; initialize variables
(count = 0)
unless(stringp(PseudoName) (PseudoName = "PSUEDO_TP"))
unless(stringp(PreFix) (PreFix = "_TP"))
when(Debug printf("PseudoName %A PreFix %A Debug %A\n" PseudoName PreFix Debug))
)
)

When I run this is Allegro, the Prefix parameter default value of "_TP" is discarded, as shown below:

\i (00:00:47) skill test_code
(00:00:47) PseudoName "psuedo_tp" PreFix nil Debug t
(00:00:47) PseudoName "psuedo_tp" PreFix "_TP" Debug t
(00:00:47) t

Has anyone else seen this issue? if so, what is the solution...

  • Cancel
  • Sign in to reply
  • DavidJHutchins
    0 DavidJHutchins 1 day ago

    Never mind, I should have used sklint to identify the issue, as reported below:

    INFO (VAR16): allegro_test_code.ils, line 6 (test_code) : declaration of variable PreFix supersedes previous declaration at line 1.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • Hoangkhoipcb
    0 Hoangkhoipcb 11 hours ago

    Hi Davi,
    The default value of the Prefix parameter "_TP" is always nil, because it is defined inside the let(PreFix) function.

    Best regards,
    Hoang Khoi

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
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