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

Passing arrays – PB Docs 126 – PowerBuilder Library

Passing arrays – PB Docs 126

Passing arrays

When an argument is an array, you specify brackets as part
of the argument name in the declaration for the function or event.

Variable-size array as an argument

For example, suppose a function named uf_convertarray accepts
a variable–size array of integers. If the argument’s
name is intarray, then for Name enter intarray[ ] and
for Type enter integer.

In the script that calls the function, you either declare
an array variable or use an instance variable or value that has
been passed to you. The declaration of that variable, wherever it
is, looks like this:

When you call the function, omit the brackets, because you
are passing the whole array. If you specified brackets, you would
be passing one value from the array:

Fixed-size array as an argument

For comparison, suppose the uf_convertarray function
accepts a fixed-size array of integers of 10 elements instead. If
the argument’s name is intarray, then
for Name enter intarray[10],
and for Type enter integer.

The declaration of the variable to be passed looks like this:

You call the function the same way, without brackets:

note.png If the array dimensions do not match

If the dimensions of the array variable passed do not match
the dimensions declared for the array argument, then array-to-array
assignment rules apply. For more information, see “Declaring arrays “.


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