### 13.1 Comments

A comment in Maxima input is any text between `/*` and `*/`.

The Maxima parser treats a comment as whitespace for the purpose of finding tokens in the input stream; a token always ends at a comment. An input such as `a/* foo */b` contains two tokens, `a` and `b`, and not a single token `ab`. Comments are otherwise ignored by Maxima; neither the content nor the location of comments is stored in parsed input expressions.

Comments can be nested to arbitrary depth. The `/*` and `*/` delimiters form matching pairs. There must be the same number of `/*` as there are `*/`.

Examples:

    (%i1) /* aa is a variable of interest */  aa : 1234;
    (%o1)                         1234
    (%i2) /* Value of bb depends on aa */  bb : aa^2;
    (%o2)                        1522756
    (%i3) /* User-defined infix operator */  infix ("b");
    (%o3)                           b
    (%i4) /* Parses same as a b c, not abc */  a/* foo */b/* bar */c;
    (%o4)                         a b c
    (%i5) /* Comments /* can be nested /* to any depth */ */ */  1 + xyz;
    (%o5)                        xyz + 1

·

Categories: Syntax