Add a Function


Declares a new function. A Function procedure is a series of steps enclosed by the Function and End Function actions. The Function procedure performs a task and then returns control to the calling macro or function. When it returns control, it also returns a value to the calling macro or function. Each time the procedure is called, its steps run, starting with the first executable step after the Function statement and ending with the first End Function, or Exit Function action encountered.

Parameters

  • Function name Specifies the function name.

  • Parameters list Specifies the parameters list for this function. The parameters are used for passing the data into the function. You can define a function with no parameters, one parameter, or more than one, but to use a call to that function with arguments you must take into consideration what is defined.

  • Description Specifies a comment for the function.

Function Arguments

There are three parameter type:

  1. General Passes a value into the function.
  2. Variable reference Passes a variable into the function. The function can read or set the value of the variable. Passing a value will cause an error occurring.
  3. Object Passes a Webpage, Excel doucment, FTP, or Dataset into the function. So that the function can read or write the content of the document.

This parameter is optional With this option checked, the parameter is optional, and you need to assign a default parameter value. The optional parameters can be omitted when the function is called.

Returning value

The value a Function procedure sends back to the calling macro or function is called its return value. The procedure returns this value in the action "Exit Function".

See Also:

  • Call Function
  • Exit Function
  • Import Functions Library