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

Coding the function – PB Docs 2021 – PowerBuilder Library

Coding the function – PB Docs 2021

Coding the function

When you have finished defining the function prototype, you
specify the code for the function just as you specify the script for
an event in the Script view. For information about using the Script
view, see Writing Scripts.

What functions can
contain

User-defined functions can include PowerScript statements,
embedded SQL statements, and calls to built-in, user-defined, and
external functions.

You can type the statements in the Script view or use the
buttons in the PainterBar or items on the Edit>Paste Special menu
to insert them into the function. For more information, see Pasting information into scripts.

Returning a
value

If you specified a return type for your function in the
Prototype window, you must return a value in the body of the
function.To return a value in a function, use the RETURN
statement:

where expression is the value you want returned by the function.
The datatype of the expression must be the datatype you specified for
the return value for the function.

Example

The following function returns the result of dividing arg1 by
arg2 if arg2 does not equal zero. It returns –1 if arg2 equals
zero:


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