Quantcast
Channel: Cadence Technology Forums
Viewing all articles
Browse latest Browse all 62947

Forum Post: (getCallingFunction) in SKILL++

$
0
0
Hi, I would like to define enhanced info , warn , error functions so the name of the calling function is printed at the beginning of the message: Here is what I've done for info : (same with warn and error ) (defun infox (message @rest args "tg") (apply 'info (cons (strcat (or (getCallingFunction) "") ": " message "\n") args))) It works perfectly fine in SKILL but it does not in SKILL++: \i toplevel 'il \p > \i (defun helloWorld nil (infox "my message")) \o function helloWorld redefined \t helloWorld \p > \i (helloWorld) \o helloWorld: my message \t nil \p > \i (defun helloWorld nil (let nil (infox "my message"))) \o function helloWorld redefined \t helloWorld \p > \i (helloWorld) \o helloWorld: my message \t nil \p > \i toplevel 'ils \p ILS-> \i (defun helloWorld nil (infox "my message")) \w *WARNING* (define): redefining SKILL function helloWorld to be Scheme variable \t helloWorld \p ILS-> \i (helloWorld) \o helloWorld: my message \t nil \p ILS-> \i (defun helloWorld nil (let nil (infox "my message"))) \o variable helloWorld redefined \t helloWorld \p ILS-> \i (helloWorld) \o : my message \t nil \p ILS-> It seems that the environment defined by the let in SKILL++ is blocking access to the call stack but I do not get why Any proper solution or workaround would be very welcome as I don't think typing the name of the calling function in every message I write is the best solution Thanks

Viewing all articles
Browse latest Browse all 62947

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>