Swift 2.0 Study Notes (Day 10) -- is the operator "+ ?, Swift Study Notes
For Original Articles, please reprint them. Reprinted Please note: Guan Dongsheng's blog
An operator is used to execute code operations. It performs operations on one or more operands. For example, 2 + 3, the operands are 2 and 3, while the operators are "+ ". Then "+,-, *,/" are operators.
Which operators are available?
The main operators in Swift include arithmetic, relational, logical, and bitwise operators.
"+,-, *, And/" are binary operators in arithmetic operators. The unary operators are-, ++, and --.
+ Add and sum. You can also use the String type to connect strings.
-Subtraction
* Multiplication Product
/Division Operator
% Obtain the remainder to calculate the remainder
-Anti-symbolic anti-operation
++ Add one or more values in auto-increment mode.
-- Subtract one from the first value and then one from the first value, or subtract multiple values first
Welcome to Guan Dongsheng Sina Weibo @ tony _ Guan Dongsheng.
Follow the public platform of Zhijie classroom to learn about the latest technical articles, books, and tutorials.
More boutique iOS, Cocos, mobile design courses please pay attention to the official site of Zhijie classroom: http://www.zhijieketang.com
Zhijie classroom Forum website: http://51work6.com/forum.php
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.