Next: , Up: Replacements

7.3.1 Global Replacement

Getstats uses a hash, %globals, to maintain a global environment. Any variable that is defined in %globals is replaced under Global replacement.

When evaluating two related expressions, Getstats declares the Perl hash %ptemp. If a variable is defined in %ptemp, it is also replaced under Global replacement. For more information See Temporary Variables.

Getstats defines several global variables automatically:

The name of the current relation.
The order in which this relation was specified on the command line, starting from zero. This variable is useful in conjunction with "if" to perform actions only for the first relation, or for the last relation.
How many relations were specified on the command line.

The following global variables are set or used by Getstats default library:

The confidence level variable is used by statistical tests to accept or reject hypothesis, and to generate confidence intervals. The default value is 95, but this can be changed via transforms, or the command line.

What should the table delimiter be. The default is none.
How many spaces should appear between columns in tables. The default is 1.
How many decimal places are printed for floating point values. The default is 3.

This contains the count of the number of warnings raised.

The global variables colexpr, stathashes, outcols, agg_commands, and agg_threads are complex types. To modify or read them them more knowledge is required, and you should look in the corresponding manual section.