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

  • 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.

主站蜘蛛池模板: 张家口市| 曲阳县| 苍梧县| 公安县| 铜鼓县| 襄汾县| 靖远县| 周宁县| 英吉沙县| 沙坪坝区| 苏尼特右旗| 黄浦区| 平远县| 长汀县| 聂拉木县| 铁力市| 新龙县| 虎林市| 罗城| 金湖县| 临沂市| 永兴县| 正安县| 广汉市| 博乐市| 青铜峡市| 松原市| 贞丰县| 景洪市| 隆林| 兴海县| 广安市| 于都县| 兴隆县| 特克斯县| 曲松县| 灵山县| 长兴县| 平安县| 宕昌县| 封开县|