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.

Dim Obtains the size of an array<br />

Example<br />

Dim (Dimension) is used to obtain the number of elements in an array.<br />

PROC arrmul(VAR num array{*}, num factor)<br />

FOR index FROM 1 TO Dim(array, 1) DO<br />

array{index} := array{index} * factor;<br />

ENDFOR<br />

ENDPROC<br />

All elements of a num array are multiplied by a factor.<br />

This procedure can take any one-dimensional array of data type num as an input.<br />

Return value Data type: num<br />

Arguments<br />

The number of array elements of the specified dimension.<br />

Dim (ArrPar DimNo)<br />

ArrPar (Array Parameter) Data type: Any type<br />

The name of the array.<br />

DimNo (Dimension Number) Data type: num<br />

The desired array dimension: 1 = first dimension<br />

2 = second dimension<br />

3 = third dimension<br />

<strong>RAPID</strong> Reference Manual 9-Dim-1

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

Saved successfully!

Ooh no, something went wrong!