aboutsummaryrefslogtreecommitdiff
path: root/amforth-6.5/common/lib/tracer.frt
diff options
context:
space:
mode:
Diffstat (limited to 'amforth-6.5/common/lib/tracer.frt')
-rw-r--r--amforth-6.5/common/lib/tracer.frt13
1 files changed, 13 insertions, 0 deletions
diff --git a/amforth-6.5/common/lib/tracer.frt b/amforth-6.5/common/lib/tracer.frt
new file mode 100644
index 0000000..9c3536e
--- /dev/null
+++ b/amforth-6.5/common/lib/tracer.frt
@@ -0,0 +1,13 @@
+\ tracer Emma Ledwidge's and Gerry
+\ flag to dynamically turn trace output
+\ on and off
+variable tracing?
+: trace:on -1 tracing? ! ;
+: trace:off 0 tracing? ! ;
+
+: tracer tracing? @ if cr itype space .s else 2drop then ;
+
+: : >in @ >r : r> >in !
+ parse-name postpone sliteral postpone tracer
+;
+