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.

GOTO Goes to a new instruction<br />

Examples<br />

Arguments<br />

Limitations<br />

GOTO is used to transfer program execution to another line (a label) within the same<br />

routine.<br />

GOTO next;<br />

.<br />

next:<br />

Program execution continues with the instruction following next.<br />

reg1 := 1;<br />

next:<br />

.<br />

reg1 := reg1 + 1;<br />

IF reg1100 GOTO highvalue;<br />

lowvalue:<br />

.<br />

GOTO ready;<br />

highvalue:<br />

.<br />

ready:<br />

If reg1 is greater than 100, the highvalue program loop is executed; otherwise<br />

the lowvalue loop is executed.<br />

GOTO Label<br />

Label Identifier<br />

The label from where program execution is to continue.<br />

It is only possible to transfer program execution to a label within the same routine.<br />

It is only possible to transfer program execution to a label within an IF or TEST<br />

instruction if the GOTO instruction is also located within the same branch of that<br />

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

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

Saved successfully!

Ooh no, something went wrong!