Advanced PowerBuilder

HomePrevious Lesson: Painting the Custom User Object
Next Lesson: Global Function f_copyrecord

Creating Functions For the Custom User Object

A function is basically a collection of PowerScript statements, which perform some processing. If you have series of statements that are expected to be used several times in the application then, it makes sense to put them in a function and call the function every time you want to execute those statements.

Functions consist of two distinct components: a function declaration and the actual code. A function declaration defines arguments the function is going to use as variables in the code. The code manipulates the arguments to achieve the required functionality.

We use several functions in this example:

We'll look briefly into each of these functions.
HomePrevious Lesson: Painting the Custom User Object
Next Lesson: Global Function f_copyrecord