Wiki Help :: Wiki Help/TightWiki Logo.png

Function Calling Convention

Functions are macros which are embedded in the wiki text that when called can alter the text of the wikipage, add meta-data, modify formatting, search, etc. Whitespace before and after the delimiters does not affect the values being passed.

Parameters are the values that are passed to functions which dictate their behavior. When multiple parameters are being passed to a function, they must be delimited by a comma (,) symbol.

Parameters come in three varieties:

Basic function call with infinite parameter
In this example, you can see that we are calling the TextList() function and passing it several search terms. We are able to pass as many as we like because the first parameter of the TextList() function is an infinite parameter.


##TextList(wiki, help, official )

Named optional parameters
Again, in this example, you can see that we are calling the TextList() function and passing it several search terms - but we also want to now pass the top parameter to limit the number of pages the function will return. As discussed previously, if the optional parameter comes after an infinite parameter, then we must pass the optional parameter by name.

Passing an optional parameter by name is as simple as placing a colon before the name of the parameter, followed by an equal sign and then the value we want to pass. See below that the :top=5 parameter is being passed by name:


##TextList(wiki, help, official , :top=5)

Additionally if we want to pass the view parameter, we'd add a (,) symbol to denote a new parameter and then specify the colon, parameter name and value just as before: :view=List:


##TextList(wiki, help, official , :top=5, :view=List)

Discrete parameters
Some functions take parameters that expect specific values from a discrete set of values to be passed. If you pass an invalid parameter value, an error will occur.

Parameter data types
Parameters are constrained to one of several data types:

See Also
Function Calling Convention
Scope Function
Instruction Function
Standard Function

<< First   |   < Previous  |  Next >  |  Last >>

Last modified by Admin @ 6/2/2024 3:18:57 PM


Login to leave a comment. View all comments