Static
versus dynamic calls
Contents
Calling functions and events
PowerBuilder calls functions and events in three ways, depending on
the type of function or event and the lookup method defined.
|
Type of function |
Compiler typing |
Comments |
|---|---|---|
|
Global and system functions |
Strongly typed. The function must exist when the |
These functions must exist and are called directly. |
|
Object functions with STATIC lookup |
Strongly typed. The function must exist when the |
The functions are polymorphic. They must exist when |
|
Object functions with DYNAMIC lookup |
Weakly typed. The function does not have to exist |
The functions are polymorphic. The actual function |
Specifying static or dynamic
lookup
For object functions and events, you can choose when PowerBuilder
looks for them by specifying static or dynamic lookup. You specify static
or dynamic lookup using the STATIC or DYNAMIC keywords. The
DYNAMIC keyword applies only to functions that are associated with an
object. You cannot call global or system functions dynamically.