VISTA can store several commands in a list and execute them as a program. A list of such commands is termed a PROCEDURE. The list is stored in a special buffer, called the 'procedure buffer'.
Almost any VISTA command that has proper syntax can be used in a procedure.
The basic commands for creating, storing, and modifying procedures are
There are several 'control commands' that effect the operation of a
This list serves not only as an introduction to those not familiar with procedures, but illustrates the flexibility that procedures give to VISTA programming. A defined procedure eliminates the boredom of typing repetitive commands over and over, but it does much more than that: it greatly expands the functions of VISTA so that new applications do not always require new subroutines. A familiarity with procedures will make your data reductions more efficient.
Do NOT put any of the flow-control statements (DO, IF, END_DO, etc.) with other commands on a line. They must appear separately. Thus:
DO I=1,10} DO J=1,10} (some stuff)} END\_DO; END\_DOor similar constructions, will NOT work properly!
As the VISTA program begins, it executes the procedure stored in the file defined by the environment variable V_STARTUP. For example, if you had defined V_STARTUP through
setenv V_STARTUP ./myprocs/myproc.probefore running VISTA, then myprocs/myproc.pro will be executed as the program begins. Typically, the startup procedure will contain definitions of aliases, the setting of symbol values, or the reading into buffers of repeatedly-used images. This procedure is not saved in the procedure buffer as it is executed.