A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://fsharp.github.io/fsharp-core-docs/reference/fsharp-quotations-fsharpvar.html below:

Var (FSharp.Core) | FSharp.Core

Var Type
Namespace: FSharp.Quotations
Assembly: FSharp.Core.dll
Base Type: obj
All Interfaces: IComparable

Information at the binding site of a variable

Constructors

Var(name, typ, ?isMutable)

Full Usage:

Var(name, typ, ?isMutable)

Parameters:


Returns: Var

The created variable.


Creates a new variable with the given name, type and mutability

name : string

The declared name of the variable.

typ : Type

The type associated with the variable.

?isMutable : bool

Indicates if the variable represents a mutable storage location. Default is false.

Returns: Var

The created variable.

 open FSharp.Quotations
 open FSharp.Quotations.Patterns

 let valueVar = Var("value"), typeof<int>)

Multiple items

namespace Microsoft.FSharp

--------------------

namespace FSharp

namespace Microsoft.FSharp.Quotations

namespace Microsoft.FSharp

module Patterns from Microsoft.FSharp.Quotations

val valueVar: 'a * System.Type

Multiple items

active recognizer Var: Expr -> Var option

--------------------

type Var = interface IComparable new: name: string * typ: Type * ?isMutable: bool -> Var static member Global: name: string * typ: Type -> Var member IsMutable: bool member Name: string member Type: Type

--------------------

new: name: string * typ: System.Type * ?isMutable: bool -> Var

val typeof<'T> : System.Type

Multiple items

val int: value: 'T -> int (requires member op_Explicit)

--------------------

type int = int32

--------------------

type int<'Measure> = int

Evaluates to a new quotation variable with the given name and type. Instance members

this.IsMutable

Full Usage:

this.IsMutable

Returns: bool


Indicates if the variable represents a mutable storage location

Returns: bool
 open FSharp.Quotations
 open FSharp.Quotations.Patterns

 match <@ fun v -> v @> with
 | Lambda(v, body) -> v.IsMutable
 | _ -> failwith "unreachable"

Multiple items

namespace Microsoft.FSharp

--------------------

namespace FSharp

namespace Microsoft.FSharp.Quotations

namespace Microsoft.FSharp

module Patterns from Microsoft.FSharp.Quotations

val v: obj

active recognizer Lambda: Expr -> (Var * Expr) option

val v: Var

val body: Expr

property Var.IsMutable: bool with get

val failwith: message: string -> 'T

Evaluates to false.

this.Name

Full Usage:

this.Name

Returns: string


The declared name of the variable

Returns: string
 open FSharp.Quotations
 open FSharp.Quotations.Patterns

 match <@ fun v -> v @> with
 | Lambda(v, body) -> v.Name
 | _ -> failwith "unreachable"

Multiple items

namespace Microsoft.FSharp

--------------------

namespace FSharp

namespace Microsoft.FSharp.Quotations

namespace Microsoft.FSharp

module Patterns from Microsoft.FSharp.Quotations

val v: obj

active recognizer Lambda: Expr -> (Var * Expr) option

val v: Var

val body: Expr

property Var.Name: string with get

val failwith: message: string -> 'T

Evaluates to "v"

this.Type

Full Usage:

this.Type

Returns: Type


The type associated with the variable

Returns: Type
 open FSharp.Quotations
 open FSharp.Quotations.Patterns

 match <@ fun v -> v @> with
 | Lambda(v, body) -> v.Type
 | _ -> failwith "unreachable"

Multiple items

namespace Microsoft.FSharp

--------------------

namespace FSharp

namespace Microsoft.FSharp.Quotations

namespace Microsoft.FSharp

module Patterns from Microsoft.FSharp.Quotations

val v: obj

active recognizer Lambda: Expr -> (Var * Expr) option

val v: Var

val body: Expr

property Var.Type: System.Type with get

val failwith: message: string -> 'T

Evaluates to typeof<int> Static members

Var.Global(name, typ)

Full Usage:

Var.Global(name, typ)

Parameters:


Returns: Var

The retrieved or created variable.


Fetches or create a new variable with the given name and type from a global pool of shared variables indexed by name and type

name : string

The name of the variable.

typ : Type

The type associated with the variable.

Returns: Var

The retrieved or created variable.

 open FSharp.Quotations
 open FSharp.Quotations.Patterns

 let valueVar1 = Var.Global("value", typeof<int>)
 let valueVar2 = Var.Global("value", typeof<int>)

Multiple items

namespace Microsoft.FSharp

--------------------

namespace FSharp

namespace Microsoft.FSharp.Quotations

namespace Microsoft.FSharp

module Patterns from Microsoft.FSharp.Quotations

val valueVar1: Var

Multiple items

active recognizer Var: Expr -> Var option

--------------------

type Var = interface IComparable new: name: string * typ: Type * ?isMutable: bool -> Var static member Global: name: string * typ: Type -> Var member IsMutable: bool member Name: string member Type: Type

--------------------

new: name: string * typ: System.Type * ?isMutable: bool -> Var

static member Var.Global: name: string * typ: System.Type -> Var

val typeof<'T> : System.Type

Multiple items

val int: value: 'T -> int (requires member op_Explicit)

--------------------

type int = int32

--------------------

type int<'Measure> = int

val valueVar2: Var

Evaluates both to valueVar1 and valueVar2 to the same variable from a global pool of shared variables.

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4