compile: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl> " to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...) |
||
Line 1: | Line 1: | ||
{{Command | {{Command | ||
| arma1 | | arma1 | ||
|1.00 | |1.00 | ||
|gr1= Strings | |gr1= Strings | ||
| Compiles [[String]] expression into [[Code]]. | | Compiles [[String]] expression into [[Code]]. | ||
| '''compile''' expression | | '''compile''' expression | ||
|p1= expression: [[String]] - expression to be compiled | |p1= expression: [[String]] - expression to be compiled | ||
| [[Code]] - compiled expression | | [[Code]] - compiled expression | ||
|x1= <code>_string <nowiki>=</nowiki> "a <nowiki>=</nowiki> a + 1"; | |x1= <code>_string <nowiki>=</nowiki> "a <nowiki>=</nowiki> a + 1"; | ||
_code <nowiki>=</nowiki> [[compile]] _string; | _code <nowiki>=</nowiki> [[compile]] _string; | ||
[[call]] _code;</code> | [[call]] _code;</code> | ||
|x2= <code>[[hint]] [[str]] [[compile]] "a = b"; | |x2= <code>[[hint]] [[str]] [[compile]] "a = b"; | ||
//Result: {a=b}</code> | //Result: {a=b}</code> | ||
| [[call]], [[spawn]], [[compileFinal]], [[parseSimpleArray]], [[isFinal]] | | [[call]], [[spawn]], [[compileFinal]], [[parseSimpleArray]], [[isFinal]] | ||
}} | }} |
Revision as of 00:13, 18 January 2021
Description
Syntax
- Syntax:
- compile expression
- Parameters:
- expression: String - expression to be compiled
- Return Value:
- Code - compiled expression
Examples
- Example 1:
_string = "a = a + 1"; _code = compile _string; call _code;
- Example 2:
hint str compile "a = b"; //Result: {a=b}
Additional Information
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note