trace (!code?) notrace (!code?)
These functions turn tracing (execution tracking to standard output) on or off, either at the global level, or for the duration of the evaluation of code, if provided.
#!/usr/local/bin/gamma -d /* here is an example of a troublesome function and its return being debugged with the aid of trace() and notrace() functions. */ a = 0; b = 1; trace(); function trouble_function(x,y) {y/x;} results = trouble_function(a,b); notrace(); princ(results, "\n");
Gamma generates the following:
(defun trouble_function (x y) (/ y x)) --> trouble_function (trouble_function a b) (/ y x) --> inf --> inf (setq results (trouble_function a b)) --> inf (notrace) inf
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.