Fsharp-operators-precedence
提供:Dev Guides
F#-演算子の優先順位
次の表に、F#言語の演算子およびその他の式キーワードの優先順位を、優先順位の低いものから高いものへと示します。
Operator | Associativity |
---|---|
as | Right |
when | Right |
(pipe) | |
Left | ; |
Right | let |
Non associative | function, fun, match, try |
Non associative | if |
Non associative | → |
Right | := |
Right | , |
Non associative | or, |
Left | &, && |
Left | < op, >op, =, |
op, &op | Left |
&&& , | |
, ^, ~, <<<, >>> | |
Left | ^ op |
Right | :: |
Right | :?>, :? |
Non associative | - op, +op, (binary) |
Left | * op,/op, %op |
Left | * *op |
Right | f x (function application) |
Left | |
(pattern match) | Right |
prefix operators (PLUSop, -op, %, %%, &, &&, !op, ~op) | Left |
. | Left |
f(x) | Left |
f<types> | Left |
例
あなたがプログラムをコンパイルして実行すると、次の出力が得られます-