Originally Posted by
Blacky
It seems like a pretty arbitrary and strange pair of tokens to use for block comments but it makes including/excluding blocks of code much easier:
--[[ I want to exclude the next two lines
a = b+c
d = e+f
--]]
---[[ I want to include the next two lines
a = b+c
d = e+f
--]]
Notice that by just adding another minus sign to the --[[ start comment token, it is no longer a valid start comment block, it is just a single line comment, so the two lines of code are now included again.
The end comment token is also ignored because it is now just a single line comment.
Regards
Paul