# GC.Spread.CalcEngine.Functions

## Content

# Namespace: Functions

[Spread](GC.Spread).[CalcEngine](GC.Spread.CalcEngine).Functions

## Table of contents

### Enumerations

- [AsyncFunctionEvaluateMode](../enums/GC.Spread.CalcEngine.Functions.AsyncFunctionEvaluateMode)

### Classes

- [AsyncFunction](../classes/GC.Spread.CalcEngine.Functions.AsyncFunction)
- [Function](../classes/GC.Spread.CalcEngine.Functions.Function)

### Interfaces

- [IFunctionDescription](../interfaces/GC.Spread.CalcEngine.Functions.IFunctionDescription)
- [IParameterDescription](../interfaces/GC.Spread.CalcEngine.Functions.IParameterDescription)

### Functions

- [defineGlobalCustomFunction](GC.Spread.CalcEngine.Functions#defineglobalcustomfunction)
- [findGlobalFunction](GC.Spread.CalcEngine.Functions#findglobalfunction)
- [removeGlobalFunction](GC.Spread.CalcEngine.Functions#removeglobalfunction)

## Functions

### <a id="defineglobalcustomfunction" name="defineglobalcustomfunction"></a> defineGlobalCustomFunction

▸ **defineGlobalCustomFunction**(`name`, `fn`): [`Function`](../classes/GC.Spread.CalcEngine.Functions.Function)

Defines a global custom function.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `name` | `string` | The name of the function. |
| `fn` | [`Function`](../classes/GC.Spread.CalcEngine.Functions.Function) | The function to add. |

#### Returns

[`Function`](../classes/GC.Spread.CalcEngine.Functions.Function)

___

### <a id="findglobalfunction" name="findglobalfunction"></a> findGlobalFunction

▸ **findGlobalFunction**(`name?`): `any`

Gets all of the global functions or one global function that specified by name.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `name?` | `string` | The name of the function. |

#### Returns

`any`

If the name is empty, return all of the global functions, otherwise, return one function with the specified name.

___

### <a id="removeglobalfunction" name="removeglobalfunction"></a> removeGlobalFunction

▸ **removeGlobalFunction**(`name?`): `void`

If the name is empty, remove all of the global functions, otherwise, remove one function with the specified name.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `name?` | `string` | The name of the function. |

#### Returns

`void`
