Progress
Language Tutorial
for Windows
Basic 4GL Constructs and Conventions
This section provides a brief overview of basic Progress language constructs and conventions. This information is by no means a complete description of the Progress language, but it does provide a starting point from which you can expand your knowledge of the Progress 4GL. To start, let’s consider the following code:
This procedure contains the following Progress language constructs and elements:
- Keywords — A keyword is a word that instructs Progress to do something. All of the unquoted capitalized words in the procedure are Progress keywords. By convention, all 4GL code examples in this tutorial use uppercase letters to display Progress keywords. However, it is important to point out that Progress is case insensitive. You can enter Progress keywords into a procedure in uppercase, lowercase, or a mix of both.
- Statements — A statement is one complete instruction to Progress. Statements normally begin with a verb (a Progress keyword) and end with a period or colon. In the code above, the keywords DEFINE, REPEAT, DISPLAY, and END all begin statements and are called verbs. The REPEAT keyword begins a special kind of statement called a block header statement. Statements can extend for several physical lines in the Procedure Editor and can contain phrases, options, and values.
- Phrases — A phrase is a collection of keywords and values that modify the way Progress executes a statement. In the code above, the keyword WITH begins a frame phrase in the DISPLAY statement. Phrases can contain options and values.
- Options — An option is like a phrase, only smaller. Options usually consist of a single keyword and a possible accompanying value. Options also modify the way Progress executes a statement. In the code above, the keyword AS is an option of the DEFINE VARIABLE statement and the keyword CENTERED is an option in the frame phrase of the DISPLAY statement.
Progress is a block-structured language—that is, you can group statements together into blocks. Procedures are the largest block structures in Progress. Later in the tutorial, you’ll learn about other types of blocks that can exist inside a procedure block.
A repeat block is similar to the repeat loop, which is found in many 3GLs) The following code fragment shows a repeat block:
![]()
Block structures within a procedure normally begin with a block-header statement and end with an END statement. You can use these block structures to apply processing services to a group of statements.
You will learn about more Progress language constructs and blocks as you proceed through this tutorial. To learn more about the syntax of the Progress language, see the Progress Language Reference or the Progress On-line Reference module in the Progress help system.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |