Defining Functions and Methods

You can create a method and a function interactively. This function and this method are available in all Knowledge browsers if the knowledge index is up-to-date.

This task shows you how to:

Create a Method

You can create a method by following the steps below.

  1. From the Type and process section, click Create Function or Method .
  2. Type the name of the method that you want to create in the Name of Interactive Function field.
  3. Check the Method radio button and click the ... button.
  4. Click the ... button in the Arguments field. The Choose Type Argument dialog box appears.
  5. Click the ... button in the Return Type field and select the type returned in the Choose Type Argument dialog box.
  6. Type the name of the argument in the Name of Argument field.
  7. In the Type of Argument area, select the type that you want to select (Complex type which is the type selected by default or Simple type) and select the type from the list. Click OK when done.
  8. Click the ... button in the Return Type field. The Choose Type Argument dialog box appears.
  9. Select the type of type that you want to select (Complex type which is the type selected by default or Simple type) and select the type from the list. Click OK when done.
  10. Enter the body in the editor.

Create a Function

You can create a function by following the steps below.

  1. From the Type and process section, click Create Function or Method .
  2. Type the name of the function that you want to create in the Name of Interactive Function field.
  3. Click the ... button in the Return Type field and select the type returned in the Choose Type Argument dialog box.
  4. Click the ... button in the Arguments field. The Choose Type Argument dialog box appears.
  5. Type the name of the argument in the Name of Argument field.
  6. In the Type of Argument area, select the type that you want to select (Complex type which is the type selected by default or Simple type) and select the type from the list. Click OK when done.
  7. Click the ... button in the Return Type field. The Choose Type Argument dialog box appears.
  8. Select the type that you want to select (Complex type which is the type selected by default or Simple type) and select the type from the list. Click OK when done.
  9. Enter the body in the editor.