call: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
 
mNo edit summary
Line 11: Line 11:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Executes the function '''body'''.
| Executes the '''function string'''.


Argument '''pars''' is passed as _this.  |= Description
Argument(s) (if any) are passed as _this. (Argument'''s''' are passed in an array) |= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


| '''''pars'' call ''body''''' |= Syntax
| Argument(s) '''call''' "function string" |= Syntax


|p1= argument: [[Any Value]] - Optional. Argument that is passed to the function in the "_this" variable. |= Parameter 1
|p1= Argument(s): [[Any Value]] - Optional. Argument that is passed to the function in the "_this" variable. |= Parameter 1
 
|p2= function string: [[String]] - A function body provided directly 'inline' or
the [[String]] returned from the commands [[loadFile]] or [[preprocessFile]].


|p2= function_body: [[String]] - A function loaded with [[loadFile]] or [[preprocessFile]], or a function body provided directly as a string. |= Parameter 2


| [[Any Value]] -   
| [[Any Value]] -   

Revision as of 03:17, 3 September 2007

Hover & click on the images for description

Description

Description:
Executes the function string. Argument(s) (if any) are passed as _this. (Arguments are passed in an array)
Groups:
Uncategorised

Syntax

Syntax:
Argument(s) call "function string"
Parameters:
Argument(s): Any Value - Optional. Argument that is passed to the function in the "_this" variable.
function string: String - A function body provided directly 'inline' or the String returned from the commands loadFile or preprocessFile.
Return Value:
Any Value - The last value given in the function is returned. See the topic Function for more information.

Examples

Example 1:
Operation Flashpoint syntax: _fAdd = loadFile "add.sqf" [1,2] call _fAdd Armed Assault syntax: _fAdd = compile loadFile "add.sqf" [1,2] call _fAdd

Additional Information

See also:
See also needed

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

Notes

Bottom Section