Using your functions – PB Docs 100

Using your functions

You use user-defined functions the same way you use built-in
functions. You can call them in event scripts or in other user-defined
functions.

For complete information about calling functions,
see Application Techniques
.

Pasting user-defined functions

When you build a script in the Script view, you can type the
call to the user-defined function. You can also paste the
function into the script. There are four ways to paste a user-defined
function into a script:

  • Drag the function from
    the System Tree to the Script view.
  • Select Edit>Paste Special>Function>User-defined
    from the menu bar.
  • Enable AutoScript, select the function’s
    signature in the list that displays when you pause, and press Tab
    or Enter.
  • Select the function in the Browser and copy and
    paste it into the script.

Using the System
Tree, AutoScript, or the Browser pastes the function’s prototype
arguments as well as its name into the script.

For more information about AutoScript, see “Using AutoScript”.

proc.gif To paste a user-defined function into a script
from the Browser:

  1. Select Tools>Browser from the
    menu bar.

  2. Do one of the following:

    • Select
      a global function from the Function page
    • Select the object that contains the object-level
      function you want to paste from the corresponding page (such as
      the Window page)
  3. Double-click the Functions category in the right
    pane.

  4. Select the function you want to paste and select
    Copy from its pop-up menu.

  5. In the Script view, move the insertion point to
    where you want to paste the function and select Paste from the pop-up
    menu.

    The function and its prototype parameters display at the insertion
    point in your script.

  6. Specify the required arguments.


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