13.07.2015 Views

Download pdf guide - VSN International

Download pdf guide - VSN International

Download pdf guide - VSN International

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

48 5 Calculations and manipulationname=expression) and the equals character in its use within the expression (e.g. S25 =4 * 6.25).All the usual arithmetic operators are available:+ addition- subtraction* multiplication/ division2** exponentiation (for example, X**2 stands for X )There are also functions and logical tests, as we describe later.CALCULATE can operate on any numerical data structure. In the example above 4 and6.25 were (unnamed) scalars. Notice that CALCULATE automatically declares the structureto hold the results if it has not been declared already (or if it has just been deleted!). Thus,as the calculation above produces a single number, S25 is automatically declared as ascalar.To illustrate the commands for calculations and manipulation, we will use a GenStatprogram in the file Calc.gen (again in the Data folder). Instead of submitting thecommands one at a time, as in Section 1.3 (see Figure 1.24) we will submit several linesat once. We first highlight the lines with the mouse, in the usual way. Then click on theSubmit Selection option of the Run menu on the menu bar, as shown in Figure 5.2. Noticethat this option has the short-cut key Ctrl-M (i.e. press the M key while holding down theCtrl key).Figure 5.2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!