Programming instructions
Intermec Fingerprint v7.61 – Programmer’s Reference Manual Ed. 7166
Chapter 2 Program Instructions
MID$
Field of Application
Function returning a specifi ed part of a string.
Syntax MID$(<sexp>,<nexp
1
>[,<nexp
2
>])
<sexp> is the original string.
<nexp
1
> is the start position in the original string.
[,<nexp
2
>] is the number of characters to be returned (optional).
Remarks
<sexp> is the original string from which a specifi ed part is to be returned.
<nexp
1
> specifi es which character position in the original string is to be the
fi rst character in the part to be returned.
<nexp
2
> restricts the number of characters to be returned. This information
is optional. If omitted, all characters from the start position specifi ed by
<nexp
1
> to the end of the string will be returned.
If the value of <nexp
1
> is less than or equal to zero, then Error 44, “Parameter
out of range” will occur.
If the value of <nexp
2
> is less than zero, then Error 44, “Parameter
out of range” will occur.
If the value of <nexp
1
> exceeds the length of the original string, an empty
string will be returned, but no error condition will occur.
If the value of <nexp
1
> does not exceed the length of the original string, but
the sum of <nexp
1
> and <nexp
2
> exceeds the length of the original string,
the remainder of the original string will be returned.
Examples
10 A$=MID$("INTERMEC PRINTERS",6,3)
20 PRINT A$
RUN
yields:
MEC
10 A$="INTERMEC PRINTERS"
20 B%=10
30 C%=7
40 D$=MID$(A$,B%,C%)
50 PRINT D$
RUN
yields:
PRINTER