|
A structure is a collection of one or more related variables of the same or different data types grouped under one name. Structures allow you to refer to related objects as a unit rather than individually. For example, if you define the user's ID, Address, Access Level, and a picture (bitmap) of the employee as a structure called user_struct, you can then refer to this collection of variables a user_struct.
TIP: In some languages, for example Pascal and COBOL, structures are called records.
Graphic example
In graphic applications structures are frequently used for objects. The standard PowerBuilder and Windows objects are structures. User-defined structures can be used to define frequently used graphic components. For example, a structure that contains the x and y coordinates of a point.
Creating a User Structure
To create a structure in PowerBuilder, use the Structure Painter. In this painter, you enter the names and data types of the variables you want to use in the structure and then name the structure.
Using a Structure
After you define the structure, you can:
but you cannot compare structures.
|