[next] [previous] [contents]

  13. Program Segmentation
  Program segmentation
is the process of dividing a pro-
  gram into small, manageable routines and modules. In a
  segmented or modular program, each routine or module
  usually performs only one logical function. You can, there-
  fore, design and implement a modular program faster than a
  nonsegmented program. Program modularity also simplifies
  debugging and testing, as well as program maintenance and
  transportability.

  This chapter describes how to:

  .
        Declare BASIC subprograms
  .
        Write BASIC subprograms
  .
        Share data among program units

  Subprograms processed by the BASIC compiler conform
  to the OpenVMS Procedure Calling Standard. This stan-
  dard prescribes how arguments are passed, how values are
  returned, and how procedures receive and return control.
  Because BASIC conforms to the OpenVMS Procedure Calling
  Standard, a BASIC subprogram or main program can call
  or be called by any procedure written in a language that
  also conforms to this standard. For information about calling
  non-BASIC procedures, see
Chapter 20.