HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)
9- 1
Chapter 9 Compiler
Introduction
The compiler increases execution speed of programs that have been
developed using the interpreter.
The interpreter is an extremely powerful development tool. It
facilitates program creation, modification, and debugging by allowing the
programmer to stop and start the program at will, examine or change the
values of variables at any time, and trace program execution. The price
of this power and flexibility is program execution speed.
The compiler produces relocatable object code files that can be linked
and executed directly by the operating system. Compiled code executes
significantly faster than interpreted code, but it is not easily examined
or changed.
This chapter explains the following:
* Compiling and running an HP Business BASIC/XL program.
* Noncompilable statements that require the interpreter environment and
therefore do not work in the compiler.
* CWARNINGS command (an interpreter command that lists noncompilable
statements).
* Noncompilable program units (main programs or subunits) that must be
modified in the interpreter before they can be compiled.
* COPTION and GLOBAL COPTION statements that specify compiler options
and directives and are ignored by the interpreter.
* OPTION and GLOBAL OPTION statements in compiled programs.
* That the main program of a compiled program is a procedure rather
than an outer block.
* Calling compiled subunits (procedures and functions) from an
interpreted program.
* How ON ERROR CALL, ON HALT CALL, and ON END CALL statements behave
across compiled subunit calls.
NOTE Not every program unit that can be interpreted can be compiled.
Whether a program can be compiled depends on the number and type of
statements it contains.
Non-compilable Statements and the CWARNINGS Command
Some HP Business BASIC/XL statements require the interpreter environment
and therefore cannot be compiled. Non-compilable HP Business BASIC/XL
statements cause compiler warnings. Some statements also generate code
that causes a run-time error.
The following statements are effectively ignored by the compiler: