---
name: "a != b"
type: command
operator: "!="
status: ok
groups: ["Variables", "Math"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/a_!%3D_b
revid: 376993
updated: 2026-01-01T08:00:36Z
---

# a != b

*Command · Variables, Math · Arma 3 v0.50 · introduced in Operation Flashpoint v1.00*

## Description

Returns whether one value is **not** equal to another. String comparison is case-**in**sensitive (e.g `"STRINGtext" != "stringTEXT" // returns false - strings are equivalent`).

> [!IMPORTANT]
> *a* and *b* types **must** match: comparing e.g [String](../topics/String.md) with [Number](../topics/Number.md) is invalid.

## Syntax

```sqf
a != b
```

**Parameters:**

- `a`:

  | Introduced in | Possible Type |
  |---|---|
  | Operation Flashpoint v1.00 | Number |
  | Side |  |
  | String |  |
  | Object |  |
  | Group |  |
  | Armed Assault v1.00 | Structured Text |
  | Config |  |
  | Display |  |
  | Control |  |
  | Armed Assault v1.08 | Location |
  | Arma 3 v2.00 | Diary Record |
  | Namespace |  |
  | Boolean |  |
- `b`: identical to *a*'s type

**Returns:** [Boolean](../topics/Boolean.md) - [true](../commands/true.md) if *a* is different from *b*, [false](../commands/false.md) otherwise

## Examples

### Example 1

```sqf
if (_counter != 4) then
{
    hint "The counter is not equal to the number 4";
};
```

### Example 2

```sqf
if (vehicle player != player) then
{
    hint "you are in a vehicle";
}
else
{
    hint "you are on foot";
};
```

### Example 3

```sqf
if (fuel truck1 != 1) then
{
    hint "Truck1 has less than a full tank of fuel.";
};
```

### Example 4

```sqf
if (alive _unit1 != alive _unit2) then { hint "One of the units is dead while another is alive" };
```

## See also

== · [Operators](../topics/Operators.md)

<sub>Source: [BI Community Wiki — a != b](https://community.bistudio.com/wiki/a_!%3D_b) (revision 376993).</sub>
