|
Data |
Top Previous Next |
|
Data calculations refer to the case where elements of a parameter or scalar are computed in a statement involving an = as illustrated above. Note these calculations are static in that the calculation is only performed at the point it appears in the code and is not updated when any input data are changed. For example consider the case below (calculate.gms)
r=1; s=2*r; Display 'one',s; r=2; display 'two',s;
Note in this case the value of s is unchanged between display one and display two even though the r parameter is changed. This means one needs to reissue the calculations if one is to update calculations when the input data to that calculation is revised. More will be said about this in the section on static/dynamic calculations below. |