• 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. exit(1) function not found ??

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 143
  • Views 380
  • 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

exit(1) function not found ??

nmz787intel
nmz787intel 6 months ago

following this post:   how to get exit code !=0 when there is a skill error in a skill script? 

I have this code:
```

(defun nestedFunction ()
(printf "Inside nested function\n")
(exit(1))
(printf "This will not be printed\n")
)

(defun mainFunction ()
(printf "Inside main function\n")
(nestedFunction)
(printf "This will also not be printed\n")
)

if(errset({
(mainFunction)
} t) then
exit(0)
else
exit(1)
)

```

and when I run it, I get this output with an error:

```

\o Inside main function
\o Inside nested function
\e *Error* eval: not a function - exit(1)

```

so apparently the "exit" function has been deprecated? What is the recommended way to kill a script with a particular returncode?

  • Cancel
  • Andrew Beckett
    Andrew Beckett 6 months ago
    nmz787intel said:
    so apparently the "exit" function has been deprecated?

    No, it hasn't. The error is saying that exit(1) is not a function. If it was an undefined function, the error would have been:

    *Error* eval: undefined function - exit

    The problem is that you have (exit(1)) - you have a list inside the function call - and it's the list of (exit 1) or exit(1) that isn't a function. Extra matched parentheses cause a problem with SKILL, mainly because of the mix of C-style and Lisp-style function calls - the flexibility of different ways of calling functions causes some inflexibility when additional parentheses are given. 

    You need to either have:

    (exit 1)

    or 

    exit(1)

    not 

    (exit(1))

    Andrew

    • Cancel
    • Vote Up 0 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