Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Referencing structures – PB Docs 2019 – PowerBuilder Library

Referencing structures – PB Docs 2019

Referencing structures

When you define a structure, you are defining a new datatype.
You can use this new datatype in scripts and user-defined functions as
long as the structure definition is stored in a library in the
application’s library search path.

To use a structure in a script or user-defined
function

  1. Declare a variable of the structure type.

  2. Reference the variable in the structure.

Referencing global
structures

The variables in a structure are similar to the properties of a
PowerBuilder object. To reference a global structure’s variable, use
dot notation:

Example. Assume that s_empdata is a global structure with the variables
emp_id, emp_dept, emp_fname, emp_lname, and emp_salary. To use this
structure definition, declare a variable of type s_empdata and use
dot notation to reference the structure’s variables, as shown in the
following script:

Referencing object-level
structures

You reference object-level structures in scripts for the object
itself exactly as you do global structures: declare a variable of the
structure type, then use dot notation:

Example. Assume that the structure str_custdata is defined for the
window w_history and you are writing a script for a CommandButton in
the window. To use the structure definition in the script, you
write:

No access to object-level structures outside the
object

You cannot make object-level structures accessible outside the
object because object-level structures are implicitly
private.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x