18.10.2014 Views

SIMSCRIPT II.5 Programming Language

SIMSCRIPT II.5 Programming Language

SIMSCRIPT II.5 Programming Language

SHOW MORE
SHOW LESS

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

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

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

and have the format line be:<br />

* *.* * *.* *<br />

All repeated formats need not be identical (e.g., * and **), but they must be of the same mode.<br />

If a controlling for phrase in a begin report statement is empty (produces no values), for example:<br />

for I = 1 to 4, with X(I) > 0,<br />

when no X(I) is greater than 0, the entire report section headed by this statement is skipped.<br />

If it is not necessary that each set of column repetition groups start on a new page, the per page<br />

clause may be omitted from the begin report statement. The following report section uses this<br />

feature to display a matrix containing more columns than can be put on one line:<br />

for I = 1 to N,<br />

do<br />

print 1 line with I as follows<br />

ROW **<br />

begin report printing<br />

for J = 1 to M, in groups of 24<br />

print 1 line with a group of X(I,J) fields as follows<br />

* * * * * * * * * * * * * * * * * * * * * * * *<br />

end<br />

'' OF REPORT<br />

skip 2 lines<br />

loop<br />

Such a program produces a report that, for M = 50, looks like figure 3-4.<br />

ROW 1<br />

* * * * * * * * * * * * * * * * * * * * * * * *<br />

* * * * * * * * * * * * * * * * * * * * * * * *<br />

* *<br />

ROW 2<br />

* * * * * * * * * * * * * * * * * * * * * * * *<br />

* * * * * * * * * * * * * * * * * * * * * * * *<br />

* *<br />

Figure 3-4. An Example of Column Repetition<br />

Note: The total number of column indices generated need not be an even multiple of the group size<br />

(e.g., 50 and 24 above).<br />

132

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

Saved successfully!

Ooh no, something went wrong!