User`s guide
332 VEE User’s Guide
9 Using Agilent VEE Functions Chapter
Using Functions
Like many programming languages, VEE uses functions to 
create subprograms that perform specific tasks. The lab 
exercises in this chapter describe how to create, call, and edit 
VEE user- defined functions. You will also learn how to create 
libraries of functions, which can be merged into programs in the 
development phase or imported at runtime. 
Defining an Agilent VEE Function
There are three types of user- defined functions in VEE. The 
overview of each type of function is as follows:
1 UserFunctions 
• To create a UserFunction, you select Device ⇒ 
UserFunction, or click Edit 
⇒ Create UserFunction with 
several objects selected.
• To call a UserFunction from different places in a program, 
you use the Call myFunction (Device 
⇒ Call) object or use an 
expression within an object (from Formula, for example). 
You can also generate call objects in the Main program 
from the UserFunction, using the UserFunction object 
menu and selecting choices such as Generate 
⇒ Call.
• To edit a UserFunction, you click on Edit ⇒ Edit 
UserFunction... and select the appropriate UserFunction 
from the list box presented.
• To transfer UserFunctions from one program to another, 
you merge the UserFunctions during program 
development or import them at runtime (Device 
⇒ Import 
Library). 
2 Compiled Functions 
• To  create a compiled function, you work outside of VEE 
using a compiled language. You then put the functions into 
a library, such as a DLL. 
• To link a compiled function to a program, you use the 
Import Library object, which links the library to VEE at 
run time. (For a more detailed discussion, refer to 
Chapter  12, “Optimizing Agilent VEE Programs).










