You can pass structures as arguments in user-defined functions. Simply name the structure as the datatype when defining the argument.Similarly, user-defined functions can return structures. Name the structure as the return type for the function.
You can also define external functions that take structures as arguments.
Example. Assume the following:
-
Revise is an external function that expects a structure as its argument.
-
lstr_empdata is a declared variable of a structure datatype.
You can call the function as follows:
Revise(lstr_empdata)
Declare the function first
The external function must be declared before you can reference it in a script.
For more about passing arguments to external functions, see the section called “Passing arguments” in Application Techniques.