From Bohemia Interactive Community
					 
					
					
					
					
				
				
				
				
				
				|  |   | 
| (10 intermediate revisions by 3 users not shown) | 
| Line 1: | Line 1: | 
|  | 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.
 |  | #REDIRECT [[:Category: Data Types]] | 
|  |   |  | 
|  | == Definition ==
 |  | 
|  |   |  | 
|  | The data type of a variable depends on the value given to it on [[Variables#Initialization|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]]:
 |  | 
|  |   |  | 
|  | * [[Array]]
 |  | 
|  | * [[Boolean]]
 |  | 
|  | * [[Group]]
 |  | 
|  | * [[Number]]
 |  | 
|  | * [[Object]]
 |  | 
|  | * [[Side]]
 |  | 
|  | * [[String]]
 |  | 
|  |   |  | 
|  | In [[Armed Assault]], the following data types have been added:
 |  | 
|  |   |  | 
|  | * [[Code]]
 |  | 
|  | * [[Config]]
 |  | 
|  | * [[Control]]
 |  | 
|  | * [[Display]]
 |  | 
|  | * [[Script (Handle)]]
 |  | 
|  | * [[Structured Text]]
 |  | 
|  |   |  | 
|  | In [[ArmA_2|{{arma2}}]], the following data types have been added:
 |  | 
|  | * [[Diary_Record]]
 |  | 
|  | * [[Task]]
 |  | 
|  | * [[Team_Member]]
 |  | 
|  | * [[Namespace]]
 |  | 
|  |   |  | 
|  | In [[VBS2]], the following data type has been added:
 |  | 
|  |   |  | 
|  | * [[Editor Object]]
 |  | 
|  |   |  | 
|  | == Magic Types ==
 |  | 
|  |   |  | 
|  | There are some magic data types, which are not really datatypes, as they do not describe any particular value.
 |  | 
|  |   |  | 
|  | * [[Any Value]]
 |  | 
|  | * [[Anything]]
 |  | 
|  | * [[Nothing]]
 |  | 
|  | * [[Void]]
 |  | 
|  |   |  | 
|  | == Syntactical Helper Types ==
 |  | 
|  |   |  | 
|  | Some more types are used to provide for a construction of syntactically richer constructs than normal unary / binary operators.
 |  | 
|  |   |  | 
|  | * [[If Type]]
 |  | 
|  | * [[While Type]]
 |  | 
|  | * [[Switch Type]]
 |  | 
|  | * [[For Type]]
 |  | 
|  |   |  | 
|  |   |  | 
|  | [[Category: Data Types| ]]
 |  | 
		Latest revision as of 23:03, 24 June 2022