官术网_书友最值得收藏!

Comments

In Chapter 1, What is Perl 6?, we've seen two ways of writing programs—by passing it in the -e command-line option or by saving it in a file. Of course, all big programs are stored in files. In this section, we will see how Perl 6 helps the programmer to organize the code better by adding comments.

Comments are parts of the source code, which are ignored by the compiler. Comments are intended to give additional information about the program itself. Good examples of comments are explanations of the algorithms used, or the purpose of variables, or a description of the input arguments of a function.

Perl 6 offers two ways of saving additional human-oriented information in the source code by using comments and the so-called Pod. First, we will examine the comments.

Comments are fragments of source code that a compiler does not consider as direct instructions for execution. In Perl 6, there are three ways of leaving comments:

  • One-line comments,
  • Multiline comments,
  • Embedded comments.

Let's examine them in detail.

主站蜘蛛池模板: 庄河市| 惠东县| 合作市| 运城市| 岑巩县| 芷江| 曲阳县| 开封市| 孝昌县| 仁化县| 乳山市| 东明县| 花莲市| 峨边| 河曲县| 福清市| 礼泉县| 义乌市| 溧水县| 靖州| 大竹县| 绥阳县| 桃源县| 交口县| 万州区| 双鸭山市| 松滋市| 丹东市| 乌拉特中旗| 朝阳区| 冕宁县| 乐安县| 佛坪县| 龙州县| 迭部县| 杂多县| 岳西县| 信宜市| 若羌县| 惠来县| 泽州县|