Static versus dynamic calls
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 |
These functions must exist and are called |
|
Object functions with STATIC lookup |
Strongly typed. The function must exist |
The functions are polymorphic. They must |
|
Object functions with DYNAMIC lookup |
Weakly typed. The function does not have |
The functions are polymorphic. The actual |
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.