---
name: "isFinal"
type: command
status: ok
groups: ["Variables"]
arma3_since: "2.00"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/isFinal
revid: 351275
updated: 2023-11-27T02:07:26Z
---

# isFinal

*Command · Variables · Arma 3 v2.00*

## Description

Checks if [Code](../topics/Code.md) or a variable was compiled final with [compileFinal](../commands/compileFinal.md).

## Syntax

```sqf
isFinal variable
```

**Parameters:**

- `variable`: [Code](../topics/Code.md), [String](../topics/String.md), Arma 3 v2.14 [Array](../topics/Array.md) or [HashMap](../topics/HashMap.md)
  - [Code](../topics/Code.md)
  - [String](../topics/String.md) - the name of the variable holding [Code](../topics/Code.md)
  - Arma 3 v2.14 [Array](../topics/Array.md) - an array that is a [HashMapKey](../topics/HashMapKey.md), a trigger's `thisList` array, made final with [compileFinal](../commands/compileFinal.md) etc.
  - Arma 3 v2.14 [HashMap](../topics/HashMap.md) - a hashmap made final with [compileFinal](../commands/compileFinal.md)

**Returns:** [Boolean](../topics/Boolean.md) - [true](../commands/true.md) if final, [false](../commands/false.md) if not

## Examples

### Example 1

```sqf
private _myCode = compileFinal "a = a + 1";
systemChat format ["isFinal ""_myCode"": %1", isFinal "_myCode"];                // true
systemChat format ["isFinal _myCode: %1", isFinal _myCode];                        // true
systemChat format ["isFinal some code: %1", isFinal { hint "Hello there" }];    // false

private _myArray1 = list _myTrigger;
systemChat format ["isFinal _myArray1: %1", isFinal _myArray1];                    // true

private _myArray2 = [1, 2, 3];
systemChat format ["isFinal _myArray2: %1", isFinal _myArray2];                    // false

private _myHashMap = compileFinal createHashMap;
systemChat format ["isFinal _myHashMap: %1", isFinal _myHashMap];                // true
```

### Example 2

Avoid .rpt's overwrite warnings:

```sqf
if (!isFinal fnc_myCode) then { fnc_myCode = compileFinal str_myCode };
```

## See also

[compile](../commands/compile.md) · [compileFinal](../commands/compileFinal.md)

<sub>Source: [BI Community Wiki — isFinal](https://community.bistudio.com/wiki/isFinal) (revision 351275).</sub>
