SET COMPILE

From Lianjapedia
Jump to: navigation, search

Purpose

Enable or disable automatic recompiling of modified source programs

Syntax

SET COMPILE ON | OFF | (<expL>)

See Also

COMPILE, DO

Description

The SET COMPILE command controls whether program files will be compiled as they are accessed, generating an object file that will then run. If SET COMPILE is ON, each time a program is run, it is compiled and an object file is generated. Files with a ’.prg’ extension have compiled object files with a ’.dbo’ extension, any other object files have the same extension as their source file, except that it ends with an ’o’. The object file, not the source file is then executed. When SET COMPILE is OFF, programs are run interpreted. Each line of the program is read and executed one after the other. By default, COMPILE is ON.

COMPILE should be set OFF when developing applications. COMPILE should be set ON once the application has been debugged and is running properly.

Example

set compile on
do myprog