Consultor Eletrônico



Kbase P16300: How to get a code preview with include file and preprocessor substitutions already made ?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   04/09/2009
Status: Verified

GOAL:

How to get a code preview with include file and preprocessor substitutions already made ?

FACT(s) (Environment):

All Supported Operating Systems
Progress 9.x
OpenEdge 10.x

FIX:

Use the PREPROCESS option of the COMPILE statement.
This will produce an ASCII file containing the preprocessed code listing. The file can be opened in the Procedure Editor, or any other text editor.

Example: /* Preprocessed.p */

/* Ask Filename */
DEFINE VARIABLE cFilename AS CHARACTER NO-UNDO FORMAT "X(50)".
UPDATE cFilename.

/* Generate preprocessed listing. */
COMPILE VALUE(cFilename) PREPROCESS VALUE(cFilename + ".pp").

/* Open Notepad (Windows only) and display listing */
DOS SILENT VALUE("notepad " + cFilename + ".pp").