Home Editors Depot Missions Depot FAQ COMREF OFPEC Tags Forum
RSS

Numeric

# | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W

Types Arrays Scripting Topics CfgVehiclesOFP/ArmA WeaponsOFP/ArmA
! a
Operand types:
Type of returned value:
Description:
not a
Used In:
ArmA/OFP
Example:
! true ..........Result is false

a != b
Operand types:
Type of returned value:
Description:
a not equal to b
Used In:
ArmA/OFP
Example:
counter != 4

stringA != stringB
Operand types:
Type of returned value:
Description:
a not equal to b (case insensitive)
Used In:
ArmA/OFP
Example:
nameofplayer != "John Doe"

obj1 != obj2
Operand types:
obj1: Object
obj2: Object
Type of returned value:
Description:
Check if two objects are different.
If any of them are objNull, true is returned.
Used In:
ArmA/OFP
Example:
vehicle player != player

side1 != side2
Operand types:
side1: Side
side2: Side
Type of returned value:
Description:
Check if two side values are different.
Used In:
ArmA/OFP
Example:
side player != west

grp1 != grp2
Operand types:
grp1: Group
grp2: Group
Type of returned value:
Description:
Check if two groups are different.
If any of them are objNull, true is returned.
Used In:
ArmA/OFP
Example:
group player != group soldierOne

text1 != text2
Operand types:
Type of returned value:
Description:
Checks whether two structured text values are different.
Used In:
ArmA

config1 != config2
Operand types:
config1: Config
config2: Config
Type of returned value:
Description:
Checks whether two config entries are different.
Used In:
ArmA

display1 != display2
Operand types:
display1: Display
display2: Display
Type of returned value:
Description:
Checks whether two displays are different.
Used In:
ArmA

control1 != control2
Operand types:
control1: Control
control2: Control
Type of returned value:
Description:
Checks whether two controls are different.
Used In:
ArmA

a % b
Operand types:
Type of returned value:
Description:
Remainder, of a divided by b
Note: Remainder is calculated in real domain.
Used In:
ArmA/OFP
Example:
4.5 % 3 ..........Result is 1.5

a && b
Operand types:
Type of returned value:
Description:
a and b
Used In:
ArmA/OFP
Example:
alive player && alive leader player

a * b
Operand types:
Type of returned value:
Description:
a multiplied by b
Used In:
ArmA/OFP
Example:
iCounter * 3

+ a
Operand types:
Type of returned value:
Description:
Unary plus: returns a
Used In:
ArmA/OFP
Example:
+ 4 ..........Result is 4

+ array
Operand types:
array: Array
Type of returned value:
Description:
Unary plus: returns a copy of array
Used In:
ArmA/OFP
Example:
+ [0, 1, 2] ..........Result is [0, 1, 2]

a + b
Operand types:
Type of returned value:
Description:
a plus b
Used In:
ArmA/OFP
Example:
counter + 1

arrayA + arrayB
Operand types:
arrayA: Array
arrayB: Array
Type of returned value:
Description:
arrayA and arrayB concatenated
Used In:
ArmA/OFP
Example:
[0, 1, 2] + [1, 2, 3] ..........Result is [0, 1, 2, 1, 2, 3]

stringA + stringB
Operand types:
stringA: String
stringB: String
Type of returned value:
Description:
stringA and stringB concatenated
Used In:
ArmA/OFP
Example:
"I" + " am" + " blind" ..........Result is "I am blind"

- a
Operand types:
Type of returned value:
Description:
Unary minus: zero minus a
Used In:
ArmA/OFP
Example:
- -3 ..........Result is 3

a - b
Operand types:
Type of returned value:
Description:
a minus b
Used In:
ArmA/OFP
Example:
counter - 1

arrayA - arrayB
Operand types:
arrayA: Array
arrayB: Array
Type of returned value:
Description:
All elements in arrayB removed from arrayA
Used In:
ArmA/OFP
Example:
[0, 1, 2, 4, 0, 1, 2, 3, 4, 5] - [1, 2, 3] ..........Result is [0, 4, 0, 4, 5]

a / b
Operand types:
Type of returned value:
Description:
a divided by b
Used In:
ArmA/OFP
Example:
enemyStrength / 3

config / name
Operand types:
config: Config
name: String
Type of returned value:
Description:
Returns subentry of config entry with given name (alias for >>).
Used In:
ArmA
Example:
configFile / "CfgVehicles"

a : b
Operand types:
Type of returned value:
Description:
see switch
Used In:
ArmA

a < b
Operand types:
Type of returned value:
Description:
a less than b
Used In:
ArmA/OFP
Example:
counter < 4

a <= b
Operand types:
Type of returned value:
Description:
a less than or equal to b
Used In:
ArmA/OFP
Example:
player distance redCar <= 100

a == b
Operand types:
Type of returned value:
Description:
a equal to b
Used In:
ArmA/OFP
Example:
counter == 4

stringA == stringB
Operand types:
Type of returned value:
Description:
a equal to b (case insensitive)
Used In:
ArmA/OFP
Example:
nameOfplayer == "John Doe"

obj1 == obj2
Operand types:
obj1: Object
obj2: Object
Type of returned value:
Description:
Check if two objects are the same one.
If any of them are objNull, false is returned.
Used In:
ArmA/OFP
Example:
player == leader player

side1 == side2
Operand types:
side1: Side
side2: Side
Type of returned value:
Description:
Check if two side values are equal.
Used In:
ArmA/OFP
Example:
side player == west

grp1 == grp2
Operand types:
grp1: Group
grp2: Group
Type of returned value:
Description:
Check if two groups are the same one.
If any of them are grpNull, false is returned.
Used In:
ArmA/OFP
Example:
group player == group soldierOne
Sefe
The operator == only works with the types: Number, Group, Side, String and Object.
It does not work with the types: Boolean and Array.

i.e. the arguments:

? MyBoolean == [] : Hint "This is a test."

and

? MyArray == [] : Hint "This is a test."

...will cause errors.

Instead of the first line use:
? MyBoolean : Hint "This is a test."

The workaround for the second line is:
? (Count MyArray) == 0 : Hint "This is a test."

text1 == text2
Operand types:
Type of returned value:
Description:
Checks whether two structured text values are equal.
Used In:
ArmA

config1 == config2
Operand types:
config1: Config
config2: Config
Type of returned value:
Description:
Checks whether two config entries are equal.
Used In:
ArmA

display1 == display2
Operand types:
display1: Display
display2: Display
Type of returned value:
Description:
Checks whether two displays are equal.
Used In:
ArmA

control1 == control2
Operand types:
control1: Control
control2: Control
Type of returned value:
Description:
Checks whether two controls are equal.
Used In:
ArmA

a > b
Operand types:
Type of returned value:
Description:
a greater than b
Used In:
ArmA/OFP
Example:
counter > 4

a >= b
Operand types:
Type of returned value:
Description:
a greater than or equal to b
Used In:
ArmA/OFP
Example:
player distance redCar >= 100

config >> name
Operand types:
config: Config
name: String
Type of returned value:
Description:
Returns subentry of config entry with given name.
Used In:
ArmA
Example:
configFile >> "CfgVehicles"

a ^ b
Operand types:
Type of returned value:
Description:
a raised to the power of b
Used In:
ArmA/OFP
Example:
count ^ 4

a || b
Operand types:
Type of returned value:
Description:
a or b
Used In:
ArmA/OFP
Example:
!alive player || !alive leader player