Skip to main content

Function

The following table provides information regarding the 'Function' SFCodeBlock.

Function SFCodeBlock

CategoryDescription
DescriptionIdentifies the beginning of a function. All stacked SFCodeBlocks belong to the function. Functions are recursive and can call themselves during the execution. Functions are also re-entrant, but you have to consider that SFStudio handles global variables only, therefore you are responsible for it.
InputWorking Space of caller, i.e., all AFElement
ParametersNone
Pattern SupportNo
ReturnsWorking space of the caller, i.e., all AFElements received in input.
ConfigurationYou are required to enter the function name. To enter a function name:
1. Click on the code block text.



2. In the Shape Name box, type a name for the function.


3. Click Save.

It is your responsibility to avoid duplicated function names in the context of the same SFHubStudio analytic (duplicated names are not detected).
You can rename an existing function by clicking in the text box and entering the new name in Edit Function Name pop-upwindow.
Iportant Note

Renaming a Function requires you to change the 'Call' and 'Task' code blocks that refer to the old function name. References to missing Functions raise the following error when the analytic is saved: