Skip to content

Comments

In summary: #

Comments in Acid are lines of text prefixed by the # character. These are used to leave notes, explanations, or disable parts of the code without affecting program execution.

Any line starting with # is ignored by the interpreter.

This is useful for documenting what code does, why certain decisions were made, or temporarily removing code during development and debugging.

Example

# This procedure does work.
method do_work($x) {                 # Create a circle at the given x position
    circle{pos{x: $x, y: 5}}->square # and a fixed y position.
}                                    # Then connect the circle to a square.

Comments can be placed:

  • On their own line
  • At the end of a line of code (inline comments)
  • At the top of files for documentation