[tw5] BASIC Anywhere Machine "debug" feature via the goodness of TW transclusion

The tiddlywiki code involved to add a “metaprogramming” debug command:

\define debug(this)
<$list filter="[<this_ver>!match[text]]">
$this$
</$list>
\end

If it is the version of a program from the tiddler text field, then it is the “production” version of the program and we don’t want the debug code included.

Otherwise, it is the “development” version of the program, and we do want the debug code included.

(I don’t use the “draft” mechanism in TiddlyWiki, because I’ll eventually need multiple versions of the program, for example: development, test, production, all of the stored in related fields in the one tiddler.)

1 Like