[Maxima] Comments inside programs

Stavros Macrakis macrakis@alum.mit.edu
Thu, 6 Mar 2003 15:02:19 -0500

> > Is there a lisp-like comments in maxima? Say, the style /* */ is
> > unsutable for one string or for side comments.
> I'm not sure.  I think Maxima used to have commenting using pound
> signs, but I just tried that, and it didn't work.

Pound-sign (#) comments are only supposed to work at the beginning of a
line (possibly preceded by whitespace).  Note that pound sign is
normally the Maxima "not equal" operator.

I find this convention inconsistent and confusing, and it is never used
in Maxima source.  Is it used in any user batch files as far as we know?
My tendency would be to deprecate it and eventually eliminate it:  /*
... */ should be fine in all cases.  If we decide we really do need an
end-of-line comment convention, let's find a better one....

What's more, the processing of "#" (in gobble-whitespace) is buggy, and
# comments only work on the second or later line of a statement, and
only if the preceding lines contain at least one character.  I don't
know how long that has been true.  Does it work in commercial Macsyma?

In 5.9.0, this works:

# A comment here
5 +
# A comment here
# A comment here

but none of the following do:

# Comment on first line

5+6 # Not at beginning of line

5+6; # Not at beginning of line

# Previous line empty (needs at least one char in it)