---
name: "comment"
type: command
status: ok
groups: ["Strings"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/comment
revid: 363597
updated: 2024-04-07T18:56:13Z
---

# comment

*Command · Strings · Arma 3 v0.50 · introduced in Operation Flashpoint v1.85*

## Description

Defines a comment. See [SQF Syntax#Comments](../topics/SQF_Syntax.md#comments) to learn more about comments.

> [!WARNING]
> This command is evaluated during execution, and as such is infinitely slower than other SQF comment methods (`// comment` or `/* comment */`) which get preprocessed and do not exist at runtime).
> See [SQF Syntax](../topics/SQF_Syntax.md) for additional documentation on comments.

> [!NOTE]
> This command is only used to place comments in unpreprocessed codes, such as trigger On Activation field, object init field, etc.
> Alternatively, one can use a plain string followed by a semicolon as a way to comment; e.g `"Some comment";`.

## Syntax

```sqf
comment text
```

**Parameters:**

- `text`: [String](../topics/String.md) - the comment

**Returns:** [Nothing](../topics/Nothing.md)

## Examples

### Example 1

In a preprocessed SQF script (e.g. when doing `execVM "myScript.sqf"`)

```sqf
comment "This is a commented line";        // bad
"This is a commented line";                // slightly better
// This is a commented line                // perfect
```

### Example 2

In an object init field (in editor):

```sqf
comment "This comment works";
"This comment works too";
// This doesn't work
/* This doesn't work either */
```

## See also

[Control Structures](../topics/Control_Structures.md)

## Community notes

**Tom_48_97** — 2009-09-12

Like Armed Assault, you can not use brackets to make a multi-lines comment. But, in a sqf file, you can make a comment as follow :

```sqf
comment "
 first line
 seconde line";
```

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