Kmid - Mitsubishi QD51 Programming Manual

Logic controller
Hide thumbs Also See for QD51:
Table of Contents

Advertisement

11 INSTRUCTIONS AND FUNCTIONS

KMID$

Function
• 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> ])
Syntax
character string expression
numeric expression 1
numeric expression 2
A$=KMID$(B$, 3, 2)
Examples
• The KMID$ function returns the character string of the number of characters specified in
Description
<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.
11 - 112
Kanji MiDdle $
• • • •
Specify the applicable character string for
processing.
• • • •
Specify the number of characters in the applicable
character expression where extraction starts.
• • • •
Specify the number of characters that are extracted
from the position specified in <numeric expression 1>.
• • • •
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$
MELSEC-Q
11 - 112

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents