The module line

You will learn

How to write the module line, which names it accepts, and where it goes.

The module line is the keyword module, a name and a semicolon. Comment and prose lines may come before it; declarations come after. Names use letters, digits and underscores; the compiler in this site also accepts hyphens, as in tutorial-06-structs. A course spec on this site must use the module name its generator expects, so a wrong name is caught by the build and not by the compiler.

Open the interactive lesson →