Sectioning Code

Last updated 3 months ago

Languages that have specification in this standard; already have sound detail on how to use the Kary Comments. What this documents tries to do, is how to use the tools in any language.

You are reading a draft edition of this document. If you found any errors, please report them to kary@gnu.org

What a Section Comment is?

A section comment is a Kary Comment that names the section. See in this example how section comments have separated the parts.

When dealing with a very long section; A "Reverse Section Comment" can be utilized to indicate the ending of that section

At the end of a series of sections, A line comment is used to decorate

Indentation of Sections

In indentation sensitive language such as Python and Haskell, a compact version of Kary Comments is used. You can see that in space sensitive languages section comments are one line and in the insensitive they are 3 lines:

//
// ─── TITLE ──────────────────────────────────────────────────────────────────────
//
# ─── TITLE ──────────────────────────────────────────────────────────────────────

But also in case insensitive languages, there is a level of indentation introduced after using the section comment as this:

Kary Coding Standard is based on the idea of 4 space tabs. It is also important to write codes with spaces to keep the layout the same everywhere.