Operators.Checked Module (F#)
This module contains the basic arithmetic operations with overflow checks.
Namespace/Module Path: Microsoft.FSharp.Core.Operators
Assembly: FSharp.Core (in FSharp.Core.dll)
module Checked
Values
Value |
Description |
---|---|
( * ) : ^T1 -> ^T2 -> ^T3 |
Overloaded multiplication operator (checks for overflow). |
( + ) : ^T1 -> 'T2 -> 'T3 |
Overloaded addition operator (checks for overflow). |
( - ) : ^T1 -> ^T2 -> ^T3 |
Overloaded subtraction operator (checks for overflow). |
( ~- ) : ^T -> ^T |
Overloaded unary negation (checks for overflow). |
byte : ^T -> byte |
Converts the argument to byte. This is a direct, checked conversion for all primitive numeric types. For strings, the input is converted using Parse() with InvariantCulture settings. Otherwise the operation requires an appropriate static conversion method on the input type. |
char : ^T -> char |
Converts the argument to char. Numeric inputs are converted using a checked conversion according to the UTF-16 encoding for characters. String inputs must be exactly one character long. For other input types the operation requires an appropriate static conversion method on the input type. |
int : ^T -> int |
Converts the argument to int. This is a direct, checked conversion for all primitive numeric types. For strings, the input is converted using Parse() with InvariantCulture settings. Otherwise the operation requires an appropriate static conversion method on the input type. |
int16 : ^T -> int16 |
Converts the argument to int16. This is a direct, checked conversion for all primitive numeric types. For strings, the input is converted using Parse() with InvariantCulture settings. Otherwise the operation requires an appropriate static conversion method on the input type. |
int32 : ^T -> int32 |
Converts the argument to int32. This is a direct, checked conversion for all primitive numeric types. For strings, the input is converted using Parse() with InvariantCulture settings. Otherwise the operation requires an appropriate static conversion method on the input type. |
int64 : ^T -> int64 |
Converts the argument to int64. This is a direct, checked conversion for all primitive numeric types. For strings, the input is converted using Parse() with InvariantCulture settings. Otherwise the operation requires an appropriate static conversion method on the input type. |
nativeint : ^T -> nativeint |
Converts the argument to nativeint. This is a direct, checked conversion for all primitive numeric types. Otherwise the operation requires an appropriate static conversion method on the input type. |
sbyte : ^T -> sbyte |
Converts the argument to sbyte. This is a direct, checked conversion for all primitive numeric types. For strings, the input is converted using Parse() with InvariantCulture settings. Otherwise the operation requires an appropriate static conversion method on the input type. |
uint16 : ^T -> uint16 |
Converts the argument to uint16. This is a direct, checked conversion for all primitive numeric types. For strings, the input is converted using Parse() with InvariantCulture settings. Otherwise the operation requires an appropriate static conversion method on the input type. |
uint32 : ^T -> uint32 |
Converts the argument to uint32. This is a direct, checked conversion for all primitive numeric types. For strings, the input is converted using Parse() with InvariantCulture settings. Otherwise the operation requires an appropriate static conversion method on the input type. |
uint64 : ^T -> uint64 |
Converts the argument to uint64. This is a direct, checked conversion for all primitive numeric types. For strings, the input is converted using Parse() with InvariantCulture settings. Otherwise the operation requires an appropriate static conversion method on the input type. |
unativeint : ^T -> unvativeint |
Converts the argument to unativeint. This is a direct, checked conversion for all primitive numeric types. Otherwise the operation requires an appropriate static conversion method on the input type. |
Platforms
Windows 7, Windows Vista SP2, Windows XP SP3, Windows XP x64 SP2, Windows Server 2008 R2, Windows Server 2008 SP2, Windows Server 2003 SP2
Version Information
F# Runtime
Supported in: 2.0, 4.0
Silverlight
Supported in: 3