F Sharp Operators Precedence - F Sharp (programming language)

What is F# - Operators Precedence?

The following table shows the order of precedence of operators and other expression keywords in the F# language, from lowest precedence to the highest precedence.

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 (+op, -op, %, %%, &, &&, !op, ~op)

Left

.

Left

f(x)

Left

f<types>

Left

Example

When you compile and execute the program, it yields the following output −

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

F Sharp (programming language) Topics