Main About Download Schemes Documentation Resources

Functions

About

Templates contain several sections to create the syntax for functions. These include all functions with the exception of the Main Function. Sometimes the Main Function requires very specific format or special statements (to set up the program). Main is defined by another section.

Java Example
[Function]
Text = public static {type} {name}({parameters}) {{ | return
= public static void {name}({parameters}) {{ | ~return
= -->BLOCK | | 1
= | return | 1
= return {return}; | return | 1
= }

Text Key

The text key is used to generate the syntax of the Function Statement.

Fields Contents
{Type} The return type of the function
{Name} The name of the function.
{Parameters} The text created by the [Parameter] section.
{Return} The name of the return variable.
Flags When True
declare The function has declared variables. This is useful if the target programming language requires a Variable Header (e.g. Pascal)
parameters The function has 1 or more parameters.
return The function returns a value.

To insert the function' block (body), use a single line containing the following special codes. If you want to change the indentation of the block, make sure to specify the indent after the second pipe |.

Special value What it does
-->BLOCK Inserts the code generated from the function's block.
-->VARIABLES Inserts the code generated from the Variable Header.