Swift 2.0 Study Notes (Day 10) -- is the operator "+ ?, Swift Study Notes

Source: Internet
Author: User
Tags bitwise operators

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 --.
  • Binary operators:
+ 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
  • Unary operator:
-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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.