compile: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Arma[ _]2(\|.*)]]" to "{{GameCategory|arma2|Scripting Commands}}") |
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
||
Line 1: | Line 1: | ||
{{Command|Comments= | {{Command|Comments= | ||
| arma1 |Game name= | | arma1 |Game name= | ||
Line 7: | Line 6: | ||
|gr1= Strings |GROUP1= | |gr1= Strings |GROUP1= | ||
| Compiles [[String]] expression into [[Code]].|DESCRIPTION= | | Compiles [[String]] expression into [[Code]].|DESCRIPTION= | ||
| '''compile''' expression |SYNTAX= | | '''compile''' expression |SYNTAX= | ||
Line 17: | Line 14: | ||
| [[Code]] - compiled expression|RETURNVALUE= | | [[Code]] - compiled expression|RETURNVALUE= | ||
|x1= <code>_string <nowiki>=</nowiki> "a <nowiki>=</nowiki> a + 1"; | |x1= <code>_string <nowiki>=</nowiki> "a <nowiki>=</nowiki> a + 1"; | ||
Line 25: | Line 21: | ||
|x2= <code>[[hint]] [[str]] [[compile]] "a = b"; | |x2= <code>[[hint]] [[str]] [[compile]] "a = b"; | ||
//Result: {a=b}</code> |EXAMPLE2= | //Result: {a=b}</code> |EXAMPLE2= | ||
| [[call]], [[spawn]], [[compileFinal]], [[parseSimpleArray]], [[isFinal]] |SEEALSO= | | [[call]], [[spawn]], [[compileFinal]], [[parseSimpleArray]], [[isFinal]] |SEEALSO= |
Revision as of 00:22, 17 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