424 Chapter 11
Optimizing Agilent VEE Programs
Compiled Function using C (UNIX)
Compiled Function using C (UNIX)
The process of using compiled functions in other languages involves shared
libraries on HP-UX platforms. You can dynamically link a program written
in C, C++, Fortran, and Pascal with a VEE program on a UNIX workstation.
Note that Pascal compiled functions are only supported on the HP 9000,
Series 700 workstations.
The program shown in Figure 11-10 imports a library and calls a C function.
The C function accepts a real array and adds 1 to each element in the array.
The modified array is returned to VEE on the
Array terminal of the Call
Function
object, and the size of the array is returned on the Ret Value
terminal. This example is located in the following VEE directory:
<installation directory>
/examples/manual/manual49.vee.
Note File extensions are as follows: a “.vee” extension indicates a program; a
“
.c” extension indicates a file containing C source code; a “.h” or “.def”
extension signifies a definition file; and a “
.sl” extension indicates a shared
library file.