Possibility to insert internal comments in clause body

Is there a possibility to insert internal comments within the clause body (similar to # this is a comment in python language).

It might be hidden somewhere in the help documentation - apologies if it is.

(Question moved to another subforum)

Good question, we should document this.

We thought about adding a special construction, but we are running out of symbols to use :-).

But actually a fairly reasonable workaround is available: just insert an internal snippet that is not actually used. The software will then completely skip this snippet, but for humans it is a good way to comment.

For example:

  1. This is some {1 + 2 = 3: complicated paragraph | else: calculation error} that requires a comment.

COMMENT = Please check with Mr. Smith before changing this complex calculation.

The only drawback is that, once inserted in the middle of the clause, the clause below the “COMMENT =” gets ignored.

As we are running out of symbols to use for comments — the best I can think of, is something like %…%, but that seems ugly — what about using the following construction:

Some body text {comment: be careful here} and the paragraph continues.

The only downside is that this comment cannot span multiple lines; but would you agree that this is a minor limitation? And if it is truly necessary to provide multi-line comments, you could still say something like {comment: be careful here — see the comment below}, and then include a COMMENT = xxx block at the bottom of the clause.

The concrete implementation would look as follows:


Actually, I was looking for a way not only to insert comments but also to have certain clause body text ignored by ClauseBase but left as simple text within the editor (e.g. a previous paragraph version that I might need to come back to).

I guess {comment: some text within the same line} could do the trick too.

Here is how Python describes its comment function:

A comment starts with a hash character ( # ) that is not part of a string literal, and ends at the end of the physical line. A comment signifies the end of the logical line unless the implicit line joining rules are invoked. Comments are ignored by the syntax.

You definitely have a point.

I went for double slashes at the beginning of the line:


The reason is that hashtags have a very special importance in ClauseBase (so Python’s comment-style did not seem optimal). Some other programming languages use a semicolon or apostrophe for comments, but that also seemed subtoptimal to me, because those characters are also used in the contractual text. Double slashes is the commenting way of C, C++, Java and other programming languages.

1 Like

This is exactly what I was missing within the clause body editor. Thanks!