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

Types of arguments for functions and events – PB Docs 80 – PowerBuilder Library

Types of arguments for functions and events – PB Docs 80

Types of arguments for functions and events

When you define a function or user event, you specify its
arguments, their data types, and how they is passed.

There are three ways to pass an argument:

  • By value is the default.
    PowerBuilder passes a copy of a by-value argument. Any changes
    affect the copy, and the original value is unaffected.
  • By reference tells PowerBuilder to pass a pointer to the passed variable.
    The function script can change the value of the variable because
    the argument points back to the original variable. An argument passed
    by reference must be a variable, not a literal or constant, so that
    it can be changed.
  • Read-only passes the argument by value without making a copy of the data.
    Read-only provides a performance advantage for some data types
    because it does not create a copy of the data, as with by value.
    Data types for which read-only provides a performance advantage
    are strings, blobs, date, time, and DateTime.

    For other data types, read-only provides documentation for
    other developers by indicating something about the purpose of the
    argument.

Matching argument types when overriding functions

If you define a function in a descendant that overrides an
ancestor function, the function signatures must match in every way:
the function name, return value, argument data types, and argument
passing methods must be the same.

For example, this function declaration has two long arguments
passed by value and one passed by reference:

If the overriding function does not match, then when you call
the function PowerBuilder calculates which function matches more closely
and calls that one, which might give unexpected results.


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