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

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.

主站蜘蛛池模板: 商南县| 南城县| 久治县| 榕江县| 汉阴县| 凤凰县| 宁都县| 盱眙县| 曲阳县| 楚雄市| 上犹县| 德令哈市| 南昌县| 华池县| 句容市| 阿勒泰市| 山阳县| 宜丰县| 沙田区| 文成县| 南充市| 阿鲁科尔沁旗| 曲沃县| 莱州市| 隆昌县| 峨山| 勃利县| 广丰县| 湖北省| 惠来县| 湘乡市| 白河县| 南通市| 西峡县| 固始县| 临邑县| 洪泽县| 涿州市| 敦化市| 新乐市| 旬邑县|