> For the complete documentation index, see [llms.txt](https://docs.luaplusplus.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.luaplusplus.org/language-improvements/macros/comment.md).

# Comment

As mentioned in the postfix section, traditional Lua comments prevent the implementation of the decrementation operator (`--`). To disable the traditional single-line Lua comment, one can use `--!comment`. Once the compiler sees that this macro is specified, single-line comments will transition over to the `#` sign and the `--` operator will replace `---` for decrementation.

Below is a code segment that would yield an error at compilation after applying the `--!comment` macro.

```lua
--!comment

-- this is an invalid comment (and code)
local v = 1
print(v---)
```

The following code segment demonstrates the correct usage of the `--!comment` macro and the syntax change it produces.

```lua
--!comment

# Valid new comment
local v = 1
print(v--)
```

An alternative to this approach of managing the conflicting comment and decrement operator issue would be to use reassignments (`var = var - 1`) or compound assignments (`var -= 1`).
