Progress
Language Reference
4GL Reference
This section contains reference entries that describe the Progress language. They begin with descriptions of the language punctuation and special characters. The remaining entries contain descriptions of the Progress statements, functions, phrases, preprocessor directives, and miscellaneous other language elements.
: Punctuation
The colon (:) symbol ends block labels and block header statements like DO, FOR, and REPEAT. It serves as a separator between a widget reference and an attribute or method, and between a character string literal and its attributes. It also follows the EDITING keyword in an EDITING phrase and is a device delimiter on Windows.
; Special Character
The semicolon (;), when combined with a second character in the Progress procedure editor, provides alternative representations of special Progress characters as follows.
![]()
To suppress the semicolon’s interpretation as a special character, precede it with a tilde (~). For example, to enter the string ;< in the procedure editor and not have Progress interpret it as an open bracket, type ~;<.
Additionally, if an ASCII character is mapped to an extended alphabetical character by an IN statement in the PROTERMCAP file, you can enter the extended character in the procedure editor by preceding the ASCII character with a semicolon. For example, if [ is mapped to Ä, Progress interprets the ;[ sequence as Ä.
. Punctuation
The period (.) symbol ends all statements, including block header statements. It is also a directory path or file suffix separator in most platforms. The DO, FOR, and REPEAT statements can end with a period or a colon.
; Punctuation
In Progress Version 6.0 or later, the ANSI SQL (-Q) startup parameter allows you to redefine the semicolon as a terminator. This startup parameter enforces strict ANSI SQL conformance and allows you to terminate SQL statements with a semicolon. The ANSI SQL (-Q) parameter allows Progress to run standard SQL statements and scripts built with other products.
The ANSI SQL (-Q) parameter disables the use of the semicolon within UNIX escapes.
As a general rule, use the period (.) as a terminator for Progress statements even when you specify the ANSI SQL (-Q) parameter for a Progress session.
, Punctuation
The comma (,) symbol separates multiple file specifications (used in FOR statements, FOR phrases of DO and REPEAT statements, and PRESELECT phrases), branching statements (used in UNDO statements and phrases), and multiple arguments of a function.
? Special Character
The question mark is a special character that represents the unknown value. Progress treats a quoted question mark (“?”) in a procedure or an input field as a question mark character. It treats an unquoted question mark (?) in a procedure or an input field as an unknown value.
Table 1 indicates the results when using the unknown value in a comparison expression (EQ, GE, GT, LE, LT, NE). These results are true for both character and integer variables.
Table 1: Using the Unknown Value in Comparison Operations Comparison
Operator
One argument is ?
Both arguments are ? EQ or = F T GE or >= ? T GT or > ? F LE or <= ? T LT or < ? F NE or <> T F
NOTE: WebSpeed treats an unquoted question mark (?) in an HTML input field as a character.Additional points about an unknown value are:
- Any number of unknown value records can be in a unique index. This is useful in cases where you want to defer choosing key values for a unique index.
- If you define a field as mandatory in the Dictionary, that field cannot contain the unknown value when Progress writes the record to the database.
- For sorting and indexing purposes, the unknown value sorts high.
- The question mark (?) character in the first position of a field equals an unknown value, not a question mark.
- When using the unknown value in a comparison expression for SQL, the result is unknown.
- When using the unknown value in an expression, the result of that expression is usually unknown. For example, when you concatenate first, middle, and last names, and the middle name is ?, then the result is ?.
For information on how the unknown value works with logical data types, comparison operators, and conditional statements, see the following reference entries: EQ or = Operator, GE or >= Operator, GT or > Operator, IF...THEN...ELSE Statement, LE or < = Operator, LT or < Operator, NE or <> Operator.
\ Special Character
The backslash (\) is an escape character for UNIX platforms only. It is a directory path separator for Windows platforms only.
~ Special Character
The tilde (~) is an escape character that causes Progress to read the following character literally. A tilde followed by three octal digits represents a single character. Use it as a lead-in to enter the special characters shown in Table 2. In a procedure, a tilde followed by something other than the items inTable 2 is ignored. For example, “~abc” is treated as “abc”. (This may not work as expected when passing parameters to an include file.) The items in Table 2 are case sensitive.
” Special Character
The double quote (”) encloses character constants or strings. To use quotes within a quoted character string, you must use two double quotes (””), which compile to a single double quote (”), or you must put a tilde (~) in front of any quotes within the quoted character string. (This does not work when passing parameters to an include file.)
See also “ ” Character-String Literal.
’ Special Character
The function of the single quote (’) is the same as the double quote. But, if you use single and double quotes in a statement, the compiler checks the outermost quotes first, giving them precedence over the innermost quotes. For example, DISPLAY ’"test"’ returns as "test". (Progress reads the double quotes literally.) And DISPLAY "’test2’" returns as ’test2’.
See also “ ” Character-String Literal.
/ Special Character
The slash (/) symbol is a directory path separator (UNIX). It is also used for date fields (99/99/99).
See also “ ” Character-String Literal.
( ) Expression Precedence
Parentheses raise expression precedence. Also, some functions require you to enclose arguments in parentheses.
See also / Division Operator.
[ ] Array Reference
Square brackets ([ ]) enclose array subscripts ([1], [2], etc.) or ranges (such as, [1 FOR 4]). In a range, you can use a variable for the first element, but the second element must be a constant. The specification [1 FOR 4] causes Progress to start with the first array element and to work with that and the next three elements. For more information on using a range of array elements, see the Progress Language Tutorial for Windows or Progress Language Tutorial for Character.
Square brackets are also used when specifying initial values for an array. For example, if you define an array variable of extent 3, you might specify initial values as INITIAL [0, 1, 2].
= Special Character
See “EQ or = Operator”, “= Assignment Operator”.
< Special Character
See “LT or < Operator”.
< = Special Character
See “LE or < = Operator”.
< > Special Character
See “NE or <> Operator”.
> Special Character
See “GT or > Operator”.
> = Special Character
See “GE or >= Operator”.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |