Conversion functions

There are no implicit conversions in F# as conversions have to be done manually using conversion routines. Conversion must be made explicitly between types using the operators that are described in the following table:

Operator

Example

Description

byte

byte x

Overloaded conversion to a byte

sbyte

sbyte x

Overloaded conversion to a signed byte

int16

int16

Overloaded conversion to a 16-bit integer

uint16

uint16

Overloaded conversion to an unsigned 16-bit integer

int32, int

Int32 x, int x

Overloaded conversion to a 32-bit integer

uint32

uint32 x

Overloaded conversion to an unsigned 32-bit integer

int64

int64 x

Overloaded conversion to a 64-bit integer

uint64

uint64 x

Overloaded conversion to an unsigned ...

Get F# for Quantitative Finance now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.