Progress
Language Tutorial
for Windows


Using Include Files

A subprocedure is a complete functional module of code—you can plug it into a larger application wherever you want. What if you have common code that does not form a complete module? Even though this code doesn’t form a functional module, you may want to modularize the common code for the same space-saving and maintenance reasons that make subprocedures valuable. For example, you may have standard interface layouts.

An include file is a text file that contains Progress source code. When you reference include files in your procedures, Progress replaces the reference with the contents of the include file at compile time. Thus, the include filename is only a placeholder for the actual code. Because Progress compiles the main procedure and the include file together, they can share the same variables, frames, and so on. Include files have an .i file extension by convention.

To reference an include file, add the include filename with its file extension to the procedure and enclose it between braces { }.

Figure 6–4 illustrates how include files work.

Figure 6–4: Using an Include File


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095