compile: Difference between revisions
Jump to navigation
Jump to search
(Remove deprecated description) |
m (template:command argument fix) |
||
Line 7: | Line 7: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| Compiles [[String]] expression into [[Code]].|= | | Compiles [[String]] expression into [[Code]].|DESCRIPTION= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| '''compile''' expression |= | | '''compile''' expression |SYNTAX= | ||
|p1= expression: [[String]] - expression to be compiled |= | |p1= expression: [[String]] - expression to be compiled |PARAMETER1= | ||
| [[Code]] - compiled expression|= | | [[Code]] - compiled expression|RETURNVALUE= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|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> |EXAMPLE1= | ||
|x2= <code>[[hint]] [[str]] [[compile]] "a = b"; | |x2= <code>[[hint]] [[str]] [[compile]] "a = b"; | ||
//Result: {a=b}</code> |= | //Result: {a=b}</code> |EXAMPLE2= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| [[call]], [[spawn]], [[compileFinal]], [[parseSimpleArray]] |= | | [[call]], [[spawn]], [[compileFinal]], [[parseSimpleArray]] |SEEALSO= | ||
}} | }} |
Revision as of 14:35, 7 April 2019
Description
- Description:
- Compiles String expression into Code.
- Groups:
- Uncategorised
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
- See also:
- callspawncompileFinalparseSimpleArray
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