Section: User Commands (1)
Updated: Feb 24, 1998
jaggler - manage several versions of a source code within the file
lets you comment out parts of your source code according to a set of
directives that are themselves encoded as comments.
The primary use of this is to have a preprocessor for the
(tm) language without actually having a new file format for
the simple reason that the java compiler would always report
errors with the wrong line count.
The flags themselves may be passed on the command line with the
switch, or defined within the file.
source code or anything else that takes
as a line-oriented comment seperator.
Multiple files can be specified.
Each will be processed and replaced by the version with the
new configuration of activated or deactivated code. The original
copy is left as backup, a tilde symbol is appended to the file name.
By the way, the name
stands for java juggler, so you should pronounce it like juggler.
It is a useful habit to indent source code with TAB characters,
since jaggler will insert
at the beginning of lines, that
are deactivated. Directives are given as
, they must
be placed on a line on their own. There are also inline conditionals
which apply to just one line, you can append them at the end using
will either activate or deactivate the following lines of code
up to either the
(you can use
too), giving you conditional compilation, a feature
doesn't normally provide for reasons that you may or may not agree upon.
Conditional directives may be nested, as you would expect.
permits you to set a flag. There is no .undef yet, do you need it?
lets you include a perl script which can extend the jaggler language
with its own directives. Read the source if you really want to
use this, but you don't need it.
There are three styles of conditional expressions, one is mentioning
the name of a flag, as in
.if DEBUG .
Another is to negate the flag, like this:
.if !DEBUG .
And then you have real expressions, which are
In that case you must precede flags with a dollar sign. Here's an
.if $DEBUG and !$PARANOID
To me if/else/endif is too much to type, that's why the following
is equivalent to
is equivalent to
is the same as
Check out the sample files.
Carl von Loesch