Variables, Expressions, and FunctionsΒΆ

A line beginning in any other way will be presumed to begin with a variable name, such as gnp$, or an expression. For the expressions, most of the functions available in G7 also are available in Compare. In particular, Compare has a useful function for sectoral models, called @csum(), which is used to sum up a specified group of industries for a given data concept. For example, suppose you wanted a certain line in your table to contain the sum of exports (“exp”) for sectors 1 to 10. Then the formula to use in the name section of the stub file would be:

@csum(exp,1-10)

The expression:

@csum(exp,1-12 (4-7) 15 18)

would include exports of sectors 1 to 12 inclusive, except for sectors 4 to 7 inclusive, and then sectors 15 and 18 in addition.

Note that when working with Vam files, a series name is followed by the vector name and the sector. Therefore, output of sector 10 would be “out10”, if the output vector is named “out”. To print a matrix element, use the matrix name, plus the row index, then a period (”.”), and finally the column index. For example, “am1.1” is am(1,1).

After the name or expression comes a ‘;’and then a line title that will be printed at the left side of the line. The length of this line title is specified by the formatting command described above. Leading blanks – blanks between the ”;” and the first visible letter on the line – will be printed and can be used to add indentation for the titles.

Previous topic

Commands Used With Vam Files

Next topic

Running the Compare Program

This Page