Progress
Language Tutorial
for Character
Calculating Values
When you calculate a value, you usually need to save the calculation result. In other words, you need a way to assign a new value to a variable or a field. In Progress, the assignment operator is the equal sign as shown in the following code:
When you use the assignment operator in this way, it is a complete Progress statement. Now suppose you need to make several calculations such as those shown in this code:
You’ve created three Progress statements to perform three calculations. Progress can perform any number of assignments using the ASSIGN statement. This is a partial syntax for the ASSIGN statement.
This example recreates the last example using ASSIGN:
Note that there is only one period—at the end of the last assignment. Using ASSIGN is more efficient than using multiple assignment statements.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |