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.

Limitations<br />

Error handling<br />

Syntax<br />

Dynamic selection of procedure call with <strong>RAPID</strong> syntax<br />

reg1 := 2;<br />

%”proc”+NumToStr(reg1,0)% door_loc;<br />

The procedure proc2 is called with argument door_loc.<br />

Limitation: All procudures must have a specific name e.g. proc1, proc2, proc3.<br />

Dynamic selection of procedure call with CallByVar<br />

reg1 := 2;<br />

CallByVar “proc”,reg1;<br />

The procedure proc2 is called.<br />

Limitation: All procedures must have specific name, e.g. proc1, proc2, proc3, and<br />

no arguments can be used.<br />

Can only be used to call procedures without parameters.<br />

Execution of CallByVar takes a little more time than execution of a normal procedure<br />

call.<br />

If the specified procedure is not found, the system variable ERRNO is set to<br />

ERR_CALLPROC.<br />

CallByVar<br />

[Name ‘:=’] ’,’<br />

[Number ‘:=‘] ’;’<br />

Related information<br />

Described in:<br />

Calling procedures <strong>Basic</strong> Characteristic - Routines<br />

User’s Guide - The programming<br />

language <strong>RAPID</strong><br />

8-CallByVar-2 <strong>RAPID</strong> Reference Manual

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

Saved successfully!

Ooh no, something went wrong!