Stack traces: Difference between revisions

m
m (→‎{{header|Unicon}}: IPL/Unilib)
Line 270:
 
==={{header|Unicon}}===
<lang Unicon>
The code for <tt>buildStackTrace</tt> is taken verbatim from the UniLib package.
import Utils # for buildStackTrace
If that package is installed, then adding:
 
<lang Unicon>import Utils</lang> at the start would be sufficient.
<lang Unicon>procedure main()
g()
write()
Line 286:
# Using 1 as argument omits the trace of buildStackTrace itself
every write("\t",!buildStackTrace(1))
end</pre>
 
{{libheader|Unicon Code Library}}
[http://tapestry.tucson.az.us/unilib/pack_Utils.html buildStackTrace in Utils] code taken verbatim.
 
<pre>#<p>
# Compute the current stack trace. Starting at level <i>n</i> above
# the current procedure. Here, <i>n</i> defaults to 0, which will
Anonymous user