18.10.2014 Views

SIMSCRIPT II.5 Programming Language

SIMSCRIPT II.5 Programming Language

SIMSCRIPT II.5 Programming Language

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>SIMSCRIPT</strong> <strong>II.5</strong> <strong>Programming</strong> <strong>Language</strong><br />

move to V<br />

return with V**2''FOR EXAMPLE<br />

end<br />

_______________________________________________________________________________<br />

The monitoring routines deliver transformed values of the attributes to the plotting routine without<br />

changing their values in memory. As there are no left-handed monitoring routines, XVAL and YVAL<br />

are stored as they are read. To change the transformations, only the monitoring routines need be<br />

altered.<br />

main and PLOT.GRAPH stay the same.<br />

6.12 Implementation Details for the TALLY Statement<br />

The program preamble generates any required attributes and routines for each tally statement. A<br />

left-handed monitoring routine is always generated for each tallied variable. The number of generated<br />

attributes and other routines varies with the statistical quantities specified. Table 6-6 presents<br />

the cases in which additional routines and attributes are generated.<br />

Table 6-6. Tally Actions<br />

Statistical Quantity<br />

number<br />

sum<br />

mean<br />

sum.of.squares<br />

mean.square<br />

variance<br />

std.dev<br />

maximum<br />

mimimum<br />

Tally Action<br />

Uses name in tally list. Attribute generated if mean, variance,<br />

std.dev, mean.square, minimum or maximum requested and<br />

number not requested.<br />

Uses name in tally list. Attribute generated if mean, variance or<br />

std.dev requested and sum not requested.<br />

Function with name in tally list generated.<br />

Uses name in tally list. Attribute generated if mean.square,<br />

variance or std.dev requested and sum.of.squares not requested.<br />

Function with name in tally list generated.<br />

Function with name in tally list generated.<br />

Function with name in tally list generated.<br />

Uses name in tally list.<br />

Uses name in tally list.<br />

From these examples it can be seen that certain counters, defined as variables or as attributes, are<br />

required for the statistical computations. These counters are listed in table 6-7.<br />

288

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

Saved successfully!

Ooh no, something went wrong!