- Perl 6 Deep Dive
- Andrew Shitov
- 183字
- 2021-07-03 00:05:55
Operator classification
First, let's remind ourselves of some of the basic terminology that we need when talking about operators. Consider a simple example:
my $a = 10;
my $b = 20;
my $c = 0;
$c = $a + $b;
say $c; # 30
Let's concentrate on the following line of code:
$c = $a + $b;
Here, we tell the compiler to perform two actions—first, calculate the sum of the $a and $b variables, and second, assign the result to the third variable, that is, $c. There are two operators in this example—+ and =. Operators are presented by their one-character names. In this case, the names are chosen to copy the corresponding operators in mathematics. Later, we will see examples of other operators, which are not just a character. They can be, for example, a sequence of two or three non-alphabetical symbols, such as >= or <= operators. Or, they can be a string identifier, for example—cmp or eq.
- 造個小程序:與微信一起干件正經事兒
- SQL Server 2012數據庫技術及應用(微課版·第5版)
- HTML5 移動Web開發從入門到精通(微課精編版)
- 深入淺出WPF
- Git高手之路
- C語言最佳實踐
- C語言程序設計案例式教程
- Easy Web Development with WaveMaker
- PHP+MySQL網站開發項目式教程
- 琢石成器:Windows環境下32位匯編語言程序設計
- The HTML and CSS Workshop
- 基于ARM Cortex-M4F內核的MSP432 MCU開發實踐
- Internet of Things with ESP8266
- 后臺開發:核心技術與應用實踐
- 單片機原理及應用技術