09.12.2012 Views

Basic Characteristics RAPID

Basic Characteristics RAPID

Basic Characteristics RAPID

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>Basic</strong> <strong>Characteristics</strong> <strong>RAPID</strong> Routines<br />

3.6 Syntax<br />

Example: ! early binding<br />

test products_id<br />

case 1:<br />

proc1 x, y, z;<br />

case 2:<br />

proc2 x, y, z;<br />

case 3:<br />

...<br />

! same example using binding<br />

% “proc” + NumToStr(product_id, 0) % x, y, z;<br />

...<br />

! same example again using another variant of late binding<br />

VAR string procname {3} :=[“proc1”, “proc2”, “proc3”];<br />

...<br />

% procname{product_id} % x, y, z;<br />

...<br />

Note that the late binding is available for procedure calls only, and not for function<br />

calls.<br />

Routine declaration<br />

::=<br />

[LOCAL] ( <br />

| <br />

| )<br />

| <br />

| <br />

Parameters<br />

::=<br />

{ }<br />

::=<br />

<br />

| <br />

| <br />

::=<br />

’,’ <br />

| <br />

| ’,’ <br />

::=<br />

’\’ ( | )<br />

{ ’|’ ( | ) }<br />

<strong>RAPID</strong> Reference Manual 5-15

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

Saved successfully!

Ooh no, something went wrong!