call – Talk

From Bohemia Interactive Community
Revision as of 21:58, 22 October 2006 by Raedor (talk | contribs) (wrong examples (ArmA))
Jump to navigation Jump to search

I think the description should be changed because call is not just used for calling functions. Furthermore the command compile should be mentioned for ArmA because functions can be precompiled in this way like:

_myFunc = compile preprocessFile "myFunc.sqf"
[1,3] call _myFunc

This should be a little bit faster than doing it without to compile the function at least if the compile command works as I expect it.


Examples

Example 1 and 3 won't work in ArmA as the string has to be transfered to code before:

_fAdd = compile loadFile "add.sqf" [1,2] call _fAdd

or

_fAdd = loadFile "add.sqf" [1,2] call compile _fAdd

and

_n = 3; call compile format [{var%1 = 0},_n];

--raedor 22:58, 22 October 2006 (CEST)