Deciding which kind you want  Opening a Prototype window to add a new function

Chapter 7: Working with User-Defined Functions

Defining user-defined functions

Although you define global functions in the Function painter and object-level functions in the painter for a specific object, in both cases you define and code the function in a Script view.

When you add a new function, a Prototype window displays above the script area in the Script view. The fields in the Prototype window are in the same order as the function’s signature:

Figure 7-1: Defining a function prototype

The following sections describe each of the steps required to define and code a new function:

  1. Opening a Prototype window to add a new function.

  2. Defining the access level (for object-level functions).

  3. Defining a return type.

  4. Naming the function.

  5. Defining arguments.

  6. Defining a THROWS clause.

  7. Coding the function.

  8. Compiling and saving the function.





Copyright © 2004. Sybase Inc. All rights reserved. Opening a Prototype window to add a new function

View this book as PDF