17.08.2013 Views

Contents, cont'd. - Intermec

Contents, cont'd. - Intermec

Contents, cont'd. - Intermec

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

MID$<br />

Field of Application Function returning a specified part of a string.<br />

Syntax MID$(,[,])<br />

Chapter 2 Program Instructions<br />

is the original string.<br />

is the start position in the original string.<br />

[,] is the number of characters to be returned (optional).<br />

Remarks is the original string from which a specified part is to be returned.<br />

specifies which character position in the original string is to be the<br />

1<br />

first character in the part to be returned.<br />

restricts the number of characters to be returned. This information<br />

2<br />

is optional. If omitted, all characters from the start position specified by<br />

to the end of the string will be returned.<br />

1<br />

If the value of is less than or equal to zero, then error condition 44<br />

1<br />

(parameter out of range) will occur.<br />

If the value of is less than zero, then error condition 44 (parameter<br />

2<br />

out of range) will occur.<br />

If the value of exceeds the length of the original string, an empty<br />

1<br />

string will be returned, but no error condition will occur.<br />

If the value of does not exceed the length of the original string, but<br />

1<br />

the sum of and exceeds the length of the original string, the<br />

1 2<br />

remainder of the original string will be returned.<br />

Examples 10 A$=MID$("INTERMEC PRINTERS",6,3)<br />

20 PRINT A$<br />

RUN<br />

MEC<br />

10 A$="INTERMEC PRINTERS"<br />

20 B%=10<br />

30 C%=7<br />

40 D$=MID$(A$,B%,C%)<br />

50 PRINT D$<br />

RUN<br />

PRINTER<br />

yields:<br />

yields:<br />

<strong>Intermec</strong> Fingerprint 7.2 – Reference Manual Ed. 3 147

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

Saved successfully!

Ooh no, something went wrong!