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.

StrPart Finds a part of a string<br />

Example<br />

StrPart (String Part) is used to find a part of a string, as a new string.<br />

VAR string part;<br />

part := StrPart("Robotics",1,5);<br />

The variable part is given the value "Robot".<br />

Return value Data type: string<br />

Arguments<br />

Syntax<br />

The substring of the specified string, which has the specified length and starts at the<br />

specified character position.<br />

StrPart (Str ChPos Len)<br />

Str (String) Data type: string<br />

The string in which a part is to be found.<br />

ChPos (Character Position) Data type: num<br />

Start character position. A runtime error is generated if the position is outside the<br />

string.<br />

Len (Length) Data type: num<br />

Length of string part. A runtime error is generated if the length is negative or<br />

greater than the length of the string, or if the substring is (partially) outside the<br />

string.<br />

StrPart’(’<br />

[ Str ’:=’ ] ’,’<br />

[ ChPos ’:=’ ] ’,’<br />

[ Len’:=’ ] <br />

’)’<br />

A function with a return value of the data type string.<br />

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

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

Saved successfully!

Ooh no, something went wrong!