Functions and Program Structure
An XJEase program will typically be broken down into smaller reusable functions.
Functions have two sets of parameters: input and output. Input parameters are passed by value: a copy is made to pass to the function. If the function modifies a value, that modification is not visible in the calling function. Output parameters are passed by reference: the calling function passes a variable into the called function and any changes made by the called function are visible to the caller when the called function returns.
Sometimes when passing a large value into a function, it may be preferable to avoid it being copied and so you may choose to pass it as an output parameter instead.
- Function Definition
- Calling Functions
- Function Scopes
- Returning from Functions
- Variable Scope Rules
- External API functions
XJTAG v4.1.100