Symbol and Operator Reference
Note
The API reference links in this article will take you to MSDN. The docs.microsoft.com API reference is not complete.
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 

! 
Reference Cells Computation Expressions 

!= 
Not applicable. 

" 
Literals Strings 

""" 
Strings  Delimits a verbatim text string. Differs from @"..." in that a you can indicate a quotation mark character by using a single quote in the string. 
# 
Compiler Directives Flexible Types 

$ 
No more information available. 

% 
Arithmetic Operators Code Quotations 

%% 
Code Quotations 

%? 
Nullable Operators 

& 
Match Expressions 

&& 
Boolean Operators 

&&& 
Bitwise Operators 

' 
Literals Automatic Generalization 

``...`` 
No more information available. 

( ) 
Unit Type 

(...) 
Tuples Operator Overloading 

(*...*) 


(...) 
Active Patterns 

* 
Arithmetic Operators Tuples Units of Measure 

*? 
Nullable Operators 

** 
Arithmetic Operators 

+ 
Arithmetic Operators 

+? 
Nullable Operators 

, 
Tuples 

 
Arithmetic Operators 

 
Nullable Operators 

> 
Functions Match Expressions 

. 
Members Primitive Types 

.. 
Loops: for...in Expression 

.. .. 
Loops: for...in Expression 

.[...] 
Arrays 

/ 
Arithmetic Operators Units of Measure 

/? 
Nullable Operators 

// 


/// 
XML Documentation 

: 
Functions 

:: 
Lists Match Expressions 

:= 
Reference Cells 

:> 
Casting and Conversions 

:? 
Match Expressions 

:?> 
Casting and Conversions 

; 
Verbose Syntax Lists Records 

< 
Arithmetic Operators 

<? 
Nullable Operators  Computes the less than operation, when the right side is a nullable type. 
<< 
Functions 

<<< 
Bitwise Operators 

< 
Values 

<...> 
Automatic Generalization 

<> 
Arithmetic Operators 

<>? 
Nullable Operators 

<= 
Arithmetic Operators 

<=? 
Nullable Operators 

< 
Functions 

< 
Operators.( < )<'T1,'T2,'U> Function 

< 
Operators.( < )<'T1,'T2,'T3,'U> Function 

<@...@> 
Code Quotations 

<@@...@@> 
Code Quotations 

= 
Arithmetic Operators 

=? 
Nullable Operators 

== 
Not applicable. 

> 
Arithmetic Operators 

>? 
Nullable Operators 

>> 
Functions 

>>> 
Bitwise Operators 

>= 
Arithmetic Operators 

>=? 
Nullable Operators 

? 
Parameters and Arguments 

? ... < ... 
No more information available. 

?>= , ?> , ?<= , ?< , ?= , ?<> , ?+ , ? , ?* , ?/ 
Nullable Operators 

>=? , >? , <=? , <? , =? , <>? , +? , ? , *? , /? 
Nullable Operators 

?>=? , ?>? , ?<=? , ?<? , ?=? , ?<>? , ?+? , ?? , ?*? , ?/? 
Nullable Operators 

@ 
Lists Strings 

[...] 
Lists 

[...] 
Arrays 

[<...>] 
Attributes 

\ 
Strings 

^ 
Statically Resolved Type Parameters Strings 

^^^ 
Bitwise Operators 

_ 
Match Expressions Generics 

` 
Automatic Generalization 

{...} 
Sequences Records 

 
Match Expressions 

 
Boolean Operators 

 
Bitwise Operators 

> 
Functions 

> 
Operators.( > )<'T1,'T2,'U> Function 

> 
Operators.( > )<'T1,'T2,'T3,'U> Function 

~~ 
Operator Overloading 

~~~ 
Bitwise Operators 

~ 
Operator Overloading 

~+ 
Operator Overloading 

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 
:> , :?> 
Right 
< op, > op, = ,  op, & op, & (including <<< , >>> ,  , &&& ) 
Left 
^ op(including ^^^ ) 
Right 
:: 
Right 
:? 
Not associative 
 op, + op 
Applies to infix uses of these symbols 
* 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 builtin or userdefined. 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
Feedback
Send feedback about:
Loading feedback...