Namespace: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
Line 1: Line 1:
'''Description:'''
{{quote|a namespace is a set of symbols that are used to organize objects of various kinds, so that these objects may be referred to by name. A namespace ensures that all the identifiers within it have unique names so that they can be easily identified.|Wikipedia|https://en.wikipedia.org/wiki/Namespace}}


Namespace - set of variables.
Namespace - set of variables. Introduced with {{arma2}}.


Introduced with Armed Assault 2.


== Get namespace ==
== Get namespace ==


These statements return the "Namespace" type:
These commands return the "Namespace" type:
 
{| class="wikitable"
*[[parsingNamespace]]
! Game !! Command !! Description
:Return the global namespace attached to config Parser
|-
*[[missionNamespace]]
| {{GVI|arma2|1.00}} || [[missionNamespace]] || returns the global namespace attached to the mission
:Return the global namespace attached to the mission
|-
*[[uiNamespace]]
| {{GVI|arma2|1.00}} || [[parsingNamespace]] || returns the global namespace attached to the [[PreProcessor Commands|Config Parser]]
:Return the global namespace attached to the user interface
|-
*[[profileNamespace]] (introduced with Take On Helicopters 1.00)
| {{GVI|arma2|1.00}} || [[uiNamespace]]     || returns the global namespace attached to the user interface
:Return the global namespace attached to the user profile  
|-
| {{GVI|tkoh|1.00}}  || [[profileNamespace]] || returns the global namespace attached to the user profile
|-
| {{GVI|arma3|1.48}} || [[currentNamespace]] || returns the current namespace. Can be compared with [[isEqualTo]].
|}


You can save values in this different Namespaces without overwriting the variables with the same name.


You can save values in this different Namespaces without overwriting the variables with the same name.


== Get namespace data ==
== Get namespace data ==


You can use the above with [[getVariable]] to get data.
You can use the above with [[getVariable]] to get data.


== Set namespace data ==
== Set namespace data ==


You can use the above with [[setVariable]] or "[[with]] '''namespace do'''" to set data.
You can use the above with [[setVariable]] or "[[with]] '''namespace''' [[do]]" to set data.




[[Category: Data Types]]
[[Category: Data Types]]

Revision as of 17:56, 31 December 2019

Template:quote

Namespace - set of variables. Introduced with Arma 2.


Get namespace

These commands return the "Namespace" type:

Game Command Description
Logo A2.png1.00 missionNamespace returns the global namespace attached to the mission
Logo A2.png1.00 parsingNamespace returns the global namespace attached to the Config Parser
Logo A2.png1.00 uiNamespace returns the global namespace attached to the user interface
tkoh logo small.png1.00 profileNamespace returns the global namespace attached to the user profile
Arma 3 logo black.png1.48 currentNamespace returns the current namespace. Can be compared with isEqualTo.

You can save values in this different Namespaces without overwriting the variables with the same name.


Get namespace data

You can use the above with getVariable to get data.


Set namespace data

You can use the above with setVariable or "with namespace do" to set data.