# PostScriptCalculatorFunction Class

> A function represented as a stream containing code written in a small subset of the PostScript language.

- Product: Adobe PDF Library 18
- Language: .NET
- Version: APDFL18.0.5PlusP2e
- HTML page: https://docs.datalogics.com/apdfl18/DotNet/APDFL18.0.5PlusP2e/class/PostScriptCalculatorFunction
- Version index: https://docs.datalogics.com/apdfl18/DotNet/APDFL18.0.5PlusP2e/llms.txt

```csharp
class PostScriptCalculatorFunction : Function
```

**Namespace:** `Datalogics::PDFL`

**Inherits from:** [`Function`](https://docs.datalogics.com/apdfl18/DotNet/APDFL18.0.5PlusP2e/class/Function.md)

## Description

A function represented as a stream containing code written in a small subset of the PostScript language.

**Referenced by:** [`PostScriptCalculatorFunction`](https://docs.datalogics.com/apdfl18/DotNet/APDFL18.0.5PlusP2e/class/PostScriptCalculatorFunction.md)

**Uses types:** [`Function`](https://docs.datalogics.com/apdfl18/DotNet/APDFL18.0.5PlusP2e/class/Function.md), [`PDFStream`](https://docs.datalogics.com/apdfl18/DotNet/APDFL18.0.5PlusP2e/class/PDFStream.md), [`PostScriptCalculatorFunction`](https://docs.datalogics.com/apdfl18/DotNet/APDFL18.0.5PlusP2e/class/PostScriptCalculatorFunction.md)

## Constructors

### PostScriptCalculatorFunction

```csharp
Datalogics.PDFL.PostScriptCalculatorFunction.PostScriptCalculatorFunction(System.Collections.Generic.IList< System.Double > domain, System.Collections.Generic.IList< System.Double > range, string code)
```

*constructor*

**Parameters**

- `domain` (`System.Collections.Generic.IList< System.Double >`): an array of 2 * m numbers, where m is the number of input values
- `range` (`System.Collections.Generic.IList< System.Double >`): an array of 2 * n numbers, where n is the number of output values
- `code` (`string`): the code of the function, written in a subset of the PostScript language

Create PostScript calculator function, represented as a stream containing code written in a small subset of the PostScript language.

## Properties

### Code

```csharp
string Datalogics.PDFL.PostScriptCalculatorFunction.Code { get; }
```

### Default

```csharp
static Function Datalogics.PDFL.Function.Default { get; }
```

*static*

A Function representing the Default named function.

### Domain

```csharp
System.Collections.Generic.IList<System.Double> Datalogics.PDFL.Function.Domain { get; set; }
```

### Identity

```csharp
static Function Datalogics.PDFL.Function.Identity { get; }
```

*static*

A Function representing the Identity named function, which returns its input values unchanged.

### NInputs

```csharp
int Datalogics.PDFL.Function.NInputs { get; }
```

### NOutputs

```csharp
int Datalogics.PDFL.Function.NOutputs { get; }
```

### Range

```csharp
System.Collections.Generic.IList<System.Double> Datalogics.PDFL.Function.Range { get; set; }
```

### Stream

```csharp
PDFStream Datalogics.PDFL.PostScriptCalculatorFunction.Stream { get; }
```

## Methods

### Apply

```csharp
virtual System.Collections.Generic.IList< System.Double > Datalogics.PDFL.Function.Apply(System.Collections.Generic.IList< System.Double > args)
```

**Parameters**

- `args` (`System.Collections.Generic.IList< System.Double >`): input values for the function. The number of input values must agree with the number of inputs the function takes.

**Returns:** `System.Collections.Generic.IList< System.Double >`

a list of the result values from the function

Apply the function to supplied input values

### Dispose

```csharp
void Datalogics.PDFL.Function.Dispose()
```

**Returns:** `void`

### ToString

```csharp
override string Datalogics.PDFL.PostScriptCalculatorFunction.ToString()
```

**Returns:** `override string`

A string representation of the PostScriptCalculatorFunction, including the number of inputs and outputs, domain, range, and the PostScript code.

A string value describing the function.

### operator!=

```csharp
static bool Datalogics.PDFL.Function.operator!=(Function a, Function b)
```

*static*

**Parameters**

- `a` ([`Function`](https://docs.datalogics.com/apdfl18/DotNet/APDFL18.0.5PlusP2e/class/Function.md)): The first Function to compare.
- `b` ([`Function`](https://docs.datalogics.com/apdfl18/DotNet/APDFL18.0.5PlusP2e/class/Function.md)): The second Function to compare.

**Returns:** `bool`

true if the two Functions are not equal; otherwise, false.

Tests two Function objects for inequality.

### operator==

```csharp
static bool Datalogics.PDFL.Function.operator==(Function a, Function b)
```

*static*

**Parameters**

- `a` ([`Function`](https://docs.datalogics.com/apdfl18/DotNet/APDFL18.0.5PlusP2e/class/Function.md)): The first Function to compare.
- `b` ([`Function`](https://docs.datalogics.com/apdfl18/DotNet/APDFL18.0.5PlusP2e/class/Function.md)): The second Function to compare.

**Returns:** `bool`

true if the two Functions are equal; otherwise, false.

Tests two Function objects for equality.
