11 - 112 11 - 112
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
KMID$
Function
Kanji MiDdle $
• Returns the partial character string that starts at the specified position of a character string
that includes full-byte characters.
KMID$ ( <character string expression> , <numeric expression 1> [, <numeric expression 2> ])
character string expression
• • • •
Specify the applicable character string for
processing.
numeric expression 1
• • • •
Specify the number of characters in the applicable
character expression where extraction starts.
Syntax
numeric expression 2
• • • •
Specify the number of characters that are extracted
from the position specified in <numeric expression 1>.
Examples
A$=KMID$(B$, 3, 2)
• • • •
Extracts two characters starting with the third
character from the left of B$ and assigns it in A$.
B$
1
1
2
3
4
5
6
-
@
@
@
@
A$
@
@
Description
• The KMID$ function returns the character string of the number of characters specified in
<numeric expression 2> starting from the character in <numeric expression 1> counting
from the left of <character string expression>. Full-byte characters are counted as one
character.
• <numeric expression 1> and <numeric expression 2> are specified in a range between 1
and 255.
• If the number of characters in <character string expression> is less than <numeric
expression 1>, “ ” (empty character string) is returned.
• If <numeric expression 2> is omitted, or if the number of characters to the right of the
character in <numeric expression 1> of <character string expression> is less than
<numeric expression 2>, all the character strings starting with the character in <numeric
expression 1> of <character string expression> will be returned.
Содержание A1SD51S
Страница 183: ...11 13 11 13 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS RUN Before swap A 0 H924 A 1 H1159 After swap A 0 H1159 A 1 H924 OK...
Страница 331: ...11 161 11 161 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CON ON OFF STOP and ZOPEN functions and Section 7 4...
Страница 557: ...11 387 11 387 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CHR SPACE and SPC functions...
Страница 629: ...11 459 11 459 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZOPEN ZSEND and ZCNTL instructions and Section 7 3 4...
Страница 645: ...11 475 11 475 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZEVENT ZSIGNAL and DEF ZEVENT instructions...