0

In examples provided on the Ethereum.org website, there are comments with @param that mention what the specific parameter is used for. Why does it exist?

0
1

Solidity uses Doxygen-style commenting. The @param is used for explaining what the parameter does. Doxygen defines certain structure for writing comments so that the comments can be automatically exported into another document (for example some documentation of the code).

More info about Doxygen: https://en.wikipedia.org/wiki/Doxygen

2
  • Didn't know this was a thing. I would assume the spacing for the description matters as well. Does this work only with multi line comments?(I'm thinking some sort of Regex is used here) Jun 20 '18 at 18:28
  • I'm not really a Doxygen expert so you should just check their documentation. I have no idea hoe lenient / strict they are with the formats. Jun 20 '18 at 18:29

Not the answer you're looking for? Browse other questions tagged or ask your own question.