# Function Syntax

The following table illustrates function syntax and usage guidelines.

Function Syntax Guidelines
Usage | Example
--- | ---
The exception -- no arguments |
    Function()
Basic format |
    Function(Data)
Nesting functions |
    Function1(Function2(Data))
Separate multiple arguments with commas |
    Function(data1, data2, data3)
Enclose string arguments in single or double quotes |
    Function('This is a demo') Function("This
    is a demo")
Arguments are expressions |
    Function1(X*Y, Function2("Text"))

To learn how to insert functions in various types of expressions see Pound Signs.

## Optional arguments in functions

Some functions may take optional arguments after their required arguments. If omitted, optional arguments take some default value. For example:

    Replace("FooFoo", "Foo", "Boo") returns "BooFoo"
    Replace("FooFoo", "Foo", "Boo", "ALL") returns "BooBoo"

The difference in behavior is explained by the fact that the Replace function takes an optional fourth argument which specifies the scope of replacement. The default value is "ONE" which explains why only the first occurrence of "Foo" was replaced with "Boo". In the second example, a fourth argument is provided that forces the function to replace all occurrences of "Foo" with "Boo".