Symbol and Operator Reference (F#)
This topic includes a table of symbols and operators that are used in the F# language.
Table of Symbols and Operators
The following table describes symbols used in the F# language, provides links to topics that provide more information, and provides a brief description of some of the uses of the symbol. Symbols are ordered according to the ASCII character set ordering.
Symbol or operator |
Links |
Description |
---|---|---|
! |
|
|
!= |
Not applicable. |
|
" |
|
|
# |
|
|
$ |
No more information available. |
|
% |
|
|
& |
|
|
&& |
|
|
&&& |
|
|
' |
|
|
``...`` |
No more information available. |
|
( ) |
|
|
(...) |
|
|
(*...*) |
|
|
(|...|) |
|
|
* |
|
|
** |
|
|
+ |
|
|
, |
|
|
- |
|
|
-> |
|
|
. |
|
|
.. |
|
|
.. .. |
|
|
.[...] |
|
|
/ |
|
|
// |
|
|
/// |
|
|
: |
|
|
:: |
|
|
:= |
|
|
:> |
|
|
:? |
|
|
:?> |
|
|
; |
|
|
< |
|
|
<< |
|
|
<<< |
|
|
<- |
|
|
<...> |
|
|
<> |
|
|
<= |
|
|
<| |
|
|
<@...@> |
|
|
<@@...@@> |
|
|
= |
|
|
== |
Not applicable. |
|
> |
|
|
>> |
|
|
>>> |
|
|
>= |
|
|
? |
|
|
? ... <- ... |
No more information available. |
|
@ |
|
|
[...] |
|
|
[|...|] |
|
|
[<...>] |
|
|
\ |
|
|
^ |
|
|
^^^ |
|
|
_ |
|
|
` |
|
|
{...} |
|
|
| |
|
|
|| |
|
|
||| |
|
|
|> |
|
|
~~ |
|
|
~~~ |
|
|
~- |
|
|
~+ |
|
Operator Precedence
The following table shows the order of precedence of operators and other expression keywords in the F# language, in order from lowest precedence to the highest precedence. Also listed is the associativity, if applicable.
Operator |
Associativity |
---|---|
as |
Right |
when |
Right |
| (pipe) |
Left |
; |
Right |
let |
Nonassociative |
function, fun, match, try |
Nonassociative |
if |
Nonassociative |
-> |
Right |
:= |
Right |
, |
Nonassociative |
or, || |
Left |
&, && |
Left |
<op, >op, =, |op, &op |
Left |
^op |
Right |
:: |
Right |
:?>, :? |
Nonassociative |
-op, +op, (binary) |
Left |
*op, /op, %op |
Left |
**op |
Right |
f x (function application) |
Left |
| (pattern match) |
Right |
prefix operators (+op, -op, %, %%, &, &&, !op, ~op) |
Left |
. |
Left |
f(x) |
Left |
f<types> |
Left |
F# supports custom operator overloading. This means that you can define your own operators. In the previous table, op can be any valid (possibly empty) sequence of operator characters, either built-in or user-defined. Thus, you can use this table to determine what sequence of characters to use for a custom operator to achieve the desired level of precedence. Leading . characters are ignored when the compiler determines precedence.
See Also
Reference
Other Resources
Change History
Date |
History |
Reason |
---|---|---|
October 2010 |
Added information about equality and inequality operators. |
Information enhancement. |