-2

I was inspecting some application's source code and I found this:

//! [1]

... some code ...

//! [1]

//! [2]

... some code ....

//! [2]

//! [3]

... some more code ...

//! [3]

What is the meaning of these comments? It appears to me they were wrotten just to split the code in "sections", much like the #region and #endregion in C#.

But do they have an inner meaning besides that? Are these comments processed by the compiler?

Matias Cicero
  • 25,439
  • 13
  • 82
  • 154

1 Answers1

2

No, the compiler does not process //! [3] in a meaningful way. It ignores it (well, that and everything until the end of the line).

Maybe it was generated by some tool. Maybe the developer used it to jump from the start to the end of some block easily. Maybe the developer was very excited about numbers in square brackets.

I'd ask the developer who wrote that code.

Yakk - Adam Nevraumont
  • 262,606
  • 27
  • 330
  • 524