09.12.2012 Views

Basic Characteristics RAPID

Basic Characteristics RAPID

Basic Characteristics RAPID

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.

Decr Decrements by 1<br />

Example<br />

Arguments<br />

Example<br />

Syntax<br />

Decr is used to subtract 1 from a numeric variable or persistent.<br />

Decr reg1;<br />

1 is subtracted from reg1, i.e. reg1:=reg1-1.<br />

Decr Name<br />

Name Data type: num<br />

The name of the variable or persistent to be decremented.<br />

TPReadNum no_of_parts, "How many parts should be produced? ";<br />

WHILE no_of_parts>0 DO<br />

produce_part;<br />

Decr no_of_parts;<br />

ENDWHILE<br />

The operator is asked to input the number of parts to be produced. The variable<br />

no_of_parts is used to count the number that still have to be produced.<br />

Decr<br />

[ Name ’:=’ ] < var or pers (INOUT) of num > ’;’<br />

<strong>RAPID</strong> Reference Manual 8-Decr-1

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

Saved successfully!

Ooh no, something went wrong!