20. Using BASIC in the Common Language
Environment
The BASIC compiler lets you call external routines from a
BASIC program. This chapter shows you how to call the
following:
.
External routines written in other OpenVMS languages
.
OpenVMS Run-Time Library routines
.
OpenVMS system services
The terms routine, procedure, and function are used
throughout this chapter. A routine is a closed, ordered
set of instructions that performs one or more specific tasks.
Every routine has an entry point (the routine name), and
may or may not have an argument list. Procedures and
functions are specific types of routines: a procedure is a
routine that does not return a value, while a function is a
routine that returns a value by assigning that value to the
function's identifier.
System routines are prewritten OpenVMS routines that
perform common tasks such as finding the square root of
a number or allocating virtual memory. You can call any
system routine from BASIC provided that the data struc-
tures necessary for that routine are supported. The system
routines used most often are OpenVMS Run-Time Library
routines and system services. System routines, which are
discussed later in this chapter, are documented in detail in
the OpenVMS Run-Time Library Routines Volume and the
OpenVMS System Services Reference Manual .