Data Types: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
Line 1: Line 1:
{{Stub}}
The '''data type''' of a [[Variables|variables]] specifies which data it may contain. Certain [[Operators|operators]] and [[:Category:Scripting Commands|scripting commands]] require variables to be of certain types.
The '''data type''' of a [[Variables|variables]] specifies which data it may contain. Certain [[Operators|operators]] and [[:Category:Scripting Commands|scripting commands]] require variables to be of certain types.



Revision as of 02:24, 22 December 2006

The data type of a variables specifies which data it may contain. Certain operators and scripting commands require variables to be of certain types.

Definition

The data type of a variable depends on the value given to it on initialization.

myVar = "";

=> myVar is now a String

Redefinition

The data type of a variable may be changed at any point of the game by just redefining the variable with another type.

myVar = "";

myVar = 0;

=> myVar is now a Number

Available Types

These are the available data types in Operation Flashpoint:


In Armed Assault, the following data types have been added:

Magic Types

There are some magic data types, which aren't really datatypes but rather placeholders.