[Home] Module Microsoft.FSharp.Core.Operators


Modules (as contributed by assembly 'FSharp.Core')

ModuleDescription
Microsoft.FSharp.Core.Operators.Checked This module contains the basic arithmetic operations with overflow checks.
Microsoft.FSharp.Core.Operators.StandardRanges
Microsoft.FSharp.Core.Operators.Unchecked This module contains the basic arithmetic operations with overflow checks.

Values

ValueDescription
val ( ! ) : 'a ref -> 'a
Dereference a mutable reference cell
val ( % ) : overloaded
Overloaded modulo operator
val ( &&& ) : overloaded
Overloaded logical-AND operator
val ( * ) : overloaded
Overloaded multiplication operator
val ( ** ) : overloaded
Overloaded power operator.
val ( *= ) : overloaded
Overloaded in-place multiplication operator
val ( + ) : overloaded
Overloaded addition operator
val ( += ) : overloaded
Overloaded in-place addition operator
val ( - ) : overloaded
Overloaded subtraction operator
val ( -= ) : overloaded
Overloaded in-place subtraction operator
val ( .% ) : overloaded
Overloaded component-wise modulo operator
val ( .() ) : 'a array -> int -> 'a
1D Array element get-accessor ('getter')
val ( .()<- ) : 'a array -> int -> 'a -> unit
1D Array element set-accessor ('setter')
val ( .* ) : overloaded
Overloaded component-wise multiplication operator
val ( .+ ) : overloaded
Overloaded component-wise addition operator
val ( .. ) : overloaded
The standard overloaded range operator, e.g. '[n..m]' for lists, '{n..m}' for sequences
val ( .. .. ) : overloaded
The standard overloaded skip range operator, e.g. '[n..m]' for lists, '{n..m}' for sequences
val ( ./ ) : overloaded
Overloaded component-wise division operator
val ( .[..,..] ) : overloaded
The standard overloaded 2D-slice operator
val ( .[..] ) : overloaded
The standard overloaded 1D-slice operator, generally used on strings, arrays and vectors. The source collection type must support a GetSlice member. The resulting collection type must support an Item property index.
val ( .^ ) : overloaded
Overloaded component-wise power operator
val ( / ) : overloaded
Overloaded division operator
val ( /= ) : overloaded
Overloaded in-place division operator
val ( := ) : 'a ref -> 'a -> unit
Assign to a mutable reference cell
val ( < ) : 'a -> 'a -> bool
Structural less-than comparison
val ( << ) : ('b -> 'c) -> ('a -> 'b) -> ('a -> 'c)
Compose two functions, the function on the right being applied first
val ( <<< ) : overloaded
Overloaded byte-shift left operator by a specified number of bits
val ( <= ) : 'a -> 'a -> bool
Structural less-than-or-equal comparison
val ( <> ) : 'a -> 'a -> bool
Structural inequality
val ( <| ) : ('a -> 'b) -> 'a -> 'b
Apply a function to a value, the value being on the right, the function on the left
val ( = ) : 'a -> 'a -> bool
Structural equality
val ( > ) : 'a -> 'a -> bool
Structural greater-than
val ( >= ) : 'a -> 'a -> bool
Structural greater-than-or-equal
val ( >> ) : ('a -> 'b) -> ('b -> 'c) -> ('a -> 'c)
Compose two functions, the function on the left being applied first
val ( >>> ) : overloaded
Overloaded byte-shift right operator by a specified number of bits
val ( ^^^ ) : overloaded
Overloaded logical-XOR operator
val ( |> ) : 'a -> ('a -> 'b) -> 'b
Apply a function to a value, the value being on the left, the function on the right
val ( ||| ) : overloaded
Overloaded logical-OR operator
val ( ~+ ) : overloaded
Overloaded prefix=plus operator
val ( ~~~ ) : overloaded
Overloaded logical-NOT operator
val abs : overloaded
Absolute value of the given number
val acos : overloaded
Inverse cosine of the given number
val asin : overloaded
Inverse sine of the given number
val assert : bool -> unit
Call System.Diagnostics.Debug.Assert(condition). Calls to this function are generated when 'assert' is used as a first class function value
val atan : overloaded
Inverse tangent of the given number
val atan2 : overloaded
Inverse tangent of 'x/y' where 'x' and 'y' are specified separatly
val box : 'a -> obj
Boxes a strongly typed variable.
val byte : overloaded
Converts the argument to byte (direct conversion for all value types, Byte.Parse() on strings otherwise [[ToByte]] method)
val ceil : overloaded
Ceiling of the given number
val char : overloaded
Converts the argument to character. Numeric inputs are converted according to the UTF-16 encoding for characters. String inputs must be exactly one character long. For other types a static member ToChar must exist on the type.
val compare : 'a -> 'a -> int
Generic comparison
val cos : overloaded
Cosine of the given number
val cosh : overloaded
Hyperbolic cosine of the given number
val decimal : overloaded
Converts the argument to System.Decimal using a direct conversion for all primitive numeric types and requiring a [[ToDecimal]] method otherwise
val defaultArg : 'a option -> 'a -> 'a
Used to specify a default value for an optional argument in the implementation of a function
val double : overloaded
Converts the argument to 64-bit float (direct conversion for all value types, Double.Parse() on strings otherwise [[ToDouble]] method)
val enum : int32 ->  ^b when  ^b : enum<int32>
Converts the argument to a particular enum type.
val exp : overloaded
Exponential of the given number
val failwith : string -> 'a
Throw a 'FailureException' exception
val float : overloaded
Converts the argument to 64-bit float (direct conversion for all value types, Double.Parse() on strings otherwise [[ToDouble]] method)
val float32 : overloaded
Converts the argument to 32-bit float (direct conversion for all value types, Single.Parse() on strings otherwise [[ToSingle]] method)
val floor : overloaded
Floor of the given number
val fst : 'b * 'a -> 'b
Return the first element of a tuple, [[fst (a,b) = a]].
val hash : 'a -> int
The "hash" function is a structural hash function. It is designed to return equal hash values for items that are equal according to the polymorphic equality function Pervasives.(=) (i.e. the standard "=" operator). The exact behaviour of the function can be adjusted on a type-by-type basis by implementing the IStructuralHash interface for each type.
val hashq : 'a -> int
The "hashq" function is designed to return equal hash values for reference types that are equal according to the physical equality '==' (see also Obj.eq). For .NET value types the implementation of Object.GetHashCode is used on a boxed version of the input. For efficiency reasons this should not typically be used on .NET value types.
val ignore : 'a -> unit
Ignore the passed value. This is often used to throw away results of a computation.
val int : overloaded
Converts the argument to signed 32-bit integer (direct conversion for all value types, Int32.Parse() on strings otherwise [[ToInt32]] method)
val int16 : overloaded
Converts the argument to signed 16-bit integer (direct conversion for all value types, Int16.Parse() on strings otherwise [[ToInt16]] method)
val int32 : overloaded
Converts the argument to signed 32-bit integer (direct conversion for all value types, Int32.Parse() on strings otherwise [[ToInt32]] method)
val int64 : overloaded
Converts the argument to signed 64-bit integer (direct conversion for all value types, Int64.Parse() on strings otherwise [[ToInt64]] method)
val invalid_arg : string -> 'a
Throw an 'InvalidArgumentException' exception
val invalid_op : string -> 'a
Throw an 'InvalidOperationException' exception
val lock : 'lock -> (unit -> 'a) -> 'a when 'lock : not struct
Execute the function as a mutual-exlcusion region using the input value as a lock.
val log : overloaded
Natural logarithm of the given number
val log10 : overloaded
Logarithm to base 10 of the given number
val max : 'a -> 'a -> 'a
Maximum based on generic comparison
val min : 'a -> 'a -> 'a
Minimum based on generic comparison
val nativeint : overloaded
Converts the argument to signed native integer (direct conversion for all primitive numeric types and [[ToIntPtr]] method otherwise)
val not : bool -> bool
Negate a logical value. 'not true' equals 'false' and 'not false' equals 'true'
val not_found : unit -> 'a
Throw an [[Not_found]]/[[KeyNotFoundException]] exception
val raise : #Exception -> 'b
Raises an exception
val ref : 'a -> 'a ref
Create a mutable reference cell
val rethrow : unit -> 'a
Rethrows an exception. This should only be used when handling an exception
val round : overloaded
Round the given number
val sbyte : overloaded
Converts the argument to signed byte (direct conversion for all value types, SByte.Parse() on strings otherwise [[ToSByte]] method)
val sign : overloaded
Sign of the given number
val sin : overloaded
Sine of the given number
val single : overloaded
Converts the argument to 32-bit float (direct conversion for all value types, Single.Parse() on strings otherwise [[ToSingle]] method)
val sinh : overloaded
Hyperbolic sine of the given number
[<RequiresExplicitTypeArgumentsAttribute ()>]
val sizeof<'a> : int
Returns the internal size of a type in bytes. For example, [[sizeof<int>]] returns 4.
val snd : 'a * 'b -> 'b
Return the second element of a tuple, [[snd (a,b) = b]].
val sqrt : overloaded
Square root of the given number
val stderr : TextWriter
Returns the value of the property System.Console.Error.
val stdin : TextReader
Returns the value of the property System.Console.In.
val stdout : TextWriter
Returns the value of the property System.Console.Out.
val tan : overloaded
Tangent of the given number
val tanh : overloaded
Hyperbolic tangent of the given number
[<RequiresExplicitTypeArgumentsAttribute ()>]
val typedefof<'a> : Type
Generate a System.Type representation for a type definition. If the input type is a generic type instantiation then return the generic type definition assocaited with all such instantiations.
[<RequiresExplicitTypeArgumentsAttribute ()>]
val typeof<'a> : Type
Generate a System.Type runtime represenation of a static type. The static type is still maintained on the value returned.
val uint16 : overloaded
Converts the argument to unsigned 16-bit integer (direct conversion for all value types, UInt16.Parse() on strings otherwise [[ToUInt16]] method)
val uint32 : overloaded
Converts the argument to unsigned 32-bit integer (direct conversion for all value types, UInt32.Parse() on strings otherwise [[ToUInt32]] method)
val uint64 : overloaded
Converts the argument to unsigned 64-bit integer (direct conversion for all value types, UInt64.Parse() on strings otherwise [[ToUInt64]] method)
val unativeint : overloaded
Converts the argument to unsigned native integer using a direct conversion for all primitive numeric types and requiring a [[ToUintPtr]] method otherwise
val unbox : obj -> 'a
Unboxes a strongly typed variable. This is the inversion of [[box]], unbox (box a) equals a.
val using : 'a -> ('a -> 'b) -> 'b when 'a :> IDisposable
Clean up resources associated with the input object after the completion of the given function. Cleanup occurs even when an exception is raised by the protected code.

Deprecated Values

ValueDescription
[<Obsolete
  ("An overload on the regular * operator should now be used instead of this operator")>]
val ( $* ) : overloaded

Note: An overload on the regular * operator should now be used instead of this operator

The left-oriented scalar multiplication operator, when the scalar is on the left side.
[<Obsolete
  ("An overload on the regular * operator should now be used instead of this operator")>]
val ( $*$ ) : overloaded

Note: An overload on the regular * operator should now be used instead of this operator

[<Obsolete
  ("An overload on the regular * operator should now be used instead of this operator")>]
val ( %* ) : overloaded

Note: An overload on the regular * operator should now be used instead of this operator

[<Obsolete
  ("An overload on the regular * operator should now be used instead of this operator")>]
val ( %*% ) : overloaded

Note: An overload on the regular * operator should now be used instead of this operator

[<Obsolete ("This operator has been deprecated")>]
val ( %*= ) : overloaded

Note: This operator has been deprecated

[<Obsolete
  ("An overload on the regular * operator should now be used instead of this operator")>]
val ( *$ ) : overloaded

Note: An overload on the regular * operator should now be used instead of this operator

[<Obsolete ("This operator has been deprecated")>]
val ( *$= ) : overloaded

Note: This operator has been deprecated

[<Obsolete
  ("An overload on the regular * operator should now be used instead of this operator")>]
val ( *% ) : overloaded

Note: An overload on the regular * operator should now be used instead of this operator

[<Obsolete ("This operator has been deprecated")>]
val ( *%= ) : overloaded

Note: This operator has been deprecated

[<Obsolete ("This operator has been deprecated")>]
val ( .%= ) : overloaded

Note: This operator has been deprecated

Overloaded in-place component-wise modulo operator
[<Obsolete ("This construct is deprecated. Use 'arr.[idx1,idx2]' instead")>]
val ( .(,) ) : 'a [,] -> int * int -> 'a

Note: This construct is deprecated. Use 'arr.[idx1,idx2]' instead

2D Array element get-accessor ('getter')
[<Obsolete ("This construct is deprecated. Use 'arr.[idx1,idx2]' instead")>]
val ( .(,)<- ) : 'a [,] -> int * int -> 'a -> unit

Note: This construct is deprecated. Use 'arr.[idx1,idx2]' instead

2D Array element set-accessor ('setter')
[<Obsolete ("This construct is deprecated. Use 'arr.[idx1,idx2]' instead")>]
val ( .(,,) ) : 'a [,,] -> int * int * int -> 'a

Note: This construct is deprecated. Use 'arr.[idx1,idx2]' instead

3D Array element get-accessor ('getter')
[<Obsolete ("This construct is deprecated. Use 'arr.[idx1,idx2]' instead")>]
val ( .(,,)<- ) : 'a [,,] -> int * int * int -> 'a -> unit

Note: This construct is deprecated. Use 'arr.[idx1,idx2]' instead

3D Array element get-accessor ('getter')
[<Obsolete ("This operator has been deprecated")>]
val ( .*= ) : overloaded

Note: This operator has been deprecated

Overloaded in-place component-wise multiplication operator
[<Obsolete ("This operator has been deprecated")>]
val ( .+= ) : overloaded

Note: This operator has been deprecated

Overloaded in-place component-wise addition operator
[<Obsolete ("This operator has been deprecated")>]
val ( ./= ) : overloaded

Note: This operator has been deprecated

Overloaded in-place component-wise division operator
[<Obsolete
  ("This warning is due to a lookup of the form 'obj.[idx,idx,idx]' where the type of 'obj' is indeterminate based on the information available at the point where the expression occurs. Consider adding further type constraints.")>]
val ( .[,,] ) : overloaded

Note: This warning is due to a lookup of the form 'obj.[idx,idx,idx]' where the type of 'obj' is indeterminate based on the information available at the point where the expression occurs. Consider adding further type constraints.

The standard overloaded associative (3-indexed) lookup operator
[<Obsolete
  ("This warning is due to a lookup of the form 'obj.[idx,idx,idx]' where the type of 'obj' is indeterminate based on the information available at the point where the expression occurs. Consider adding further type constraints.")>]
val ( .[,,]<- ) : overloaded

Note: This warning is due to a lookup of the form 'obj.[idx,idx,idx]' where the type of 'obj' is indeterminate based on the information available at the point where the expression occurs. Consider adding further type constraints.

The standard overloaded associative (3-indexed) mutation operator
[<Obsolete
  ("This warning is due to a lookup of the form 'obj.[idx,idx]' where the type of 'obj' is indeterminate based on the information available at the point where the expression occurs. Consider adding further type constraints.")>]
val ( .[,] ) : overloaded

Note: This warning is due to a lookup of the form 'obj.[idx,idx]' where the type of 'obj' is indeterminate based on the information available at the point where the expression occurs. Consider adding further type constraints.

The standard overloaded associative (2-indexed) lookup operator
[<Obsolete
  ("This warning is due to a lookup of the form 'obj.[idx,idx]' where the type of 'obj' is indeterminate based on the information available at the point where the expression occurs. Consider adding further type constraints.")>]
val ( .[,]<- ) : overloaded

Note: This warning is due to a lookup of the form 'obj.[idx,idx]' where the type of 'obj' is indeterminate based on the information available at the point where the expression occurs. Consider adding further type constraints.

The standard overloaded associative (2-indexed) mutation operator
[<Obsolete
  ("This warning is due to a lookup of the form 'obj.[idx]' where the type of 'obj' is indeterminate based on the information available at the point where the expression occurs. Consider adding further type constraints.")>]
val ( .[] ) : overloaded

Note: This warning is due to a lookup of the form 'obj.[idx]' where the type of 'obj' is indeterminate based on the information available at the point where the expression occurs. Consider adding further type constraints.

The standard overloaded associative (indexed) lookup operator
[<Obsolete
  ("This warning is due to a lookup of the form 'obj.[idx]' where the type of 'obj' is indeterminate based on the information available at the point where the expression occurs. Consider adding further type constraints.")>]
val ( .[]<- ) : overloaded

Note: This warning is due to a lookup of the form 'obj.[idx]' where the type of 'obj' is indeterminate based on the information available at the point where the expression occurs. Consider adding further type constraints.

The standard overloaded associative (indexed) mutation operator
[<Obsolete ("This operator has been deprecated")>]
val ( .^= ) : overloaded

Note: This operator has been deprecated

Overloaded in-place component-wise power operator
[<Obsolete
  ("This construct is deprecated. Convert to 'uint32' and use '>>>' instead")>]
val op_OverloadedLogicalRightShift : overloaded

Note: This construct is deprecated. Convert to 'uint32' and use '>>>' instead

Logical right-shift of an object by a specified number of bits

See Also

Microsoft.FSharp.Core


Documentation for assembly FSharp.Core, version 1.9.4.19, generated using F# version 1.9.4.19