はじめに
用語と定義をしっかり覚える事が好きな自分用です。
演算子の優先順位とその意味を見やすくまとめようと思い投稿します。
優先順位
[高] +(単項) ! ~ ! 否定演算子, ~a ビット演算子、aが1ならば0、またその逆
** ** 代数演算子, a**b aのb乗
-(単項)
* / % % 代数演算子, a%b aをbで割った時の余り
+ -
> >= < <=
<=> == === != =~ !~ <=> 宇宙船演算子, =~ 正規表現演算子
&& && 論理演算子, a && b aかつbが真ならば真
|| || 論理演算子, a || b aまたはbが真ならば真
.. ... .. 範囲演算子
?:(条件演算子) ?= 条件演算子, a ? b : c aが真ならばbその他はc
=
not
[低] and or