Klen ( Returns The Number Of Characters Of The Character String That Includes Full-Byte Characters ) - Mitsubishi QD51 Programming Manual

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

Advertisement

11 INSTRUCTIONS AND FUNCTIONS
KLEN
Function
• Returns the number of characters of the character string that includes full-byte characters.
KLEN (<character string expression> [, <function> ])
Syntax
character string expression
function
A=KLEN(A$, 0)
Examples
B=KLEN(A$, 1)
C=KLEN(A$, 2)
• The KLEN function returns the number of characters of the type specified in <function>.
Description
• The following numeric values are specified in <function>. If omitted, it defaults to "0."
0
• • • •
1
• • • •
2
• • • •
11 - 110
Kanji LENgth
• • • •
• • • •
• • • •
A$
A B C
1 2 3 4
• • • •
A$
A B C
1 2 3
• • • •
A$ ABC@ @ @ @
1
Overall number of characters (full-byte characters are processed as one
character)
Number of half-byte characters (numbers, alphabet characters, Kana
characters, etc.)
Full-byte characters (number of full-byte characters)
Specify the target character string.
Specify what type of character is to be counted.
Assigns the total number of characters to A treating
full-byte characters as one character.
@
@
@
@ D E F
5
6
7 8 9 10
Counts the number of half-byte characters in
character string A$ and assigns the value to B.
@
@
@
@ D E F
4 5 6
Counts the number of full-byte characters in
character string A$ and assigns the value to C.
DEF
2
3
4
MELSEC-Q
10
6
4
11 - 110

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents