02.10.2012 Views

Programmer's Reference Manual Intermec Fingerprint® v8.70.0 ...

Programmer's Reference Manual Intermec Fingerprint® v8.70.0 ...

Programmer's Reference Manual Intermec Fingerprint® v8.70.0 ...

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.

INSTR<br />

Chapter —Program Instructions<br />

Purpose Function searching a specified string for a certain character, or sequence of<br />

characters, and returning its position in relation to the start of the string.<br />

Syntax INSTR([,],)<br />

is , optionally, the position where the search will start.<br />

is the string to be searched.<br />

is the character(s) for which the string will be searched.<br />

Remarks INSTR allows you to search a string for some particular character(s) and<br />

return the position of the character, or the first character in the sequence,<br />

as a number of characters positions measured from the start of the string.<br />

As an option, it is possible to specify a certain position in the string from<br />

which the search will start. If no start position is specified, the search will<br />

start at the beginning of the string.<br />

The result will be zero if<br />

- the start position value exceeds the length of the string.<br />

- the string is empty.<br />

- the searched combination of characters cannot be found.<br />

Examples In this example, the string "INTERMEC_PRINTER_AB" is searched for<br />

the character combination "AB". No start position is specified.<br />

10 A$="INTERMEC PRINTER AB"<br />

20 B$="AB"<br />

30 PRINT INSTR(A$,B$)<br />

RUN<br />

yields:<br />

18<br />

In next example, the string "INTERMEC_PRINTER_AB" is searched for<br />

the character "I" and the start position is specified as 4.<br />

10 A$="INTERMEC PRINTER AB"<br />

20 B$="I"<br />

30 PRINT INSTR(4,A$,B$)<br />

RUN<br />

yields:<br />

12<br />

<strong>Intermec</strong> Fingerprint <strong>v8.70.0</strong>/v10.0.0 Programmer´s <strong>Reference</strong> <strong>Manual</strong> 1

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

Saved successfully!

Ooh no, something went wrong!