Solidity语言学习笔记————8、运算符优先顺序

编程入门 行业动态 更新时间:2024-10-12 22:33:48

Solidity语言<a href=https://www.elefans.com/category/jswz/34/1770117.html style=学习笔记————8、运算符优先顺序"/>

Solidity语言学习笔记————8、运算符优先顺序

运算符优先顺序(Order of Precedence of Operators)

以下是按evaluation顺序列出的运算符优先顺序。

优先级描述运算符
1Postfix increment and decrement++, --
1New expressionnew <typename>
1Array subscripting<array>[<index>]
1Member access<object>.<member>
1Function-like call<func>(<args...>)
1Parentheses(<statement>)
2Prefix increment and decrement++, --
2Unary plus and minus+, -
2Unary operationsdelete
2Logical NOT!
2Bitwise NOT~
3Exponentiation**
4Multiplication, division and modulo*, /, %
5Addition and subtraction+, -
6Bitwise shift operators<<, >>
7Bitwise AND&
8Bitwise XOR^
9Bitwise OR|
10Inequality operators<, >, <=, >=
11Equality operators==, !=
12Logical AND&&
13Logical OR||
14Ternary operator<conditional> ? <if-true> : <if-false>
15Assignment operators=, |=, ^=, &=, <<=, >>=, +=, -=, *=, /=, %=
16Comma operator,

更多推荐

Solidity语言学习笔记————8、运算符优先顺序

本文发布于:2024-03-23 23:35:30,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1744170.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:学习笔记   顺序   运算符   语言   Solidity

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!