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

  • Perl 6 Deep Dive
  • Andrew Shitov
  • 175字
  • 2021-07-03 00:05:46

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.

主站蜘蛛池模板: 嘉祥县| 巴彦县| 定安县| 嘉义县| 屏边| 沧源| 东源县| 滁州市| 海兴县| 莲花县| 夏邑县| 虎林市| 宝山区| 连山| 蒙山县| 吉木萨尔县| 文水县| 临海市| 冀州市| 兖州市| 大名县| 驻马店市| 贵南县| 广元市| 体育| 江源县| 虹口区| 虎林市| 永康市| 封开县| 潼南县| 刚察县| 渭南市| 兴仁县| 丘北县| 碌曲县| 清水县| 大姚县| 霍城县| 白银市| 南郑县|