Mitsubishi QD51 Programming Manual page 281

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

Advertisement

11 INSTRUCTIONS AND FUNCTIONS
Program Example
10 ' Counts the number of overall, half-byte, and full-byte characters
20 A$="AD51H@@@@@@@"
30 A=KLEN(A$,0)
40 B=KLEN(A$,1)
50 C=KLEN(A$,2)
60 PRINT "Character string -->";A$
70 PRINT "Number of overall characters ------>";A
80 PRINT "Number of half-byte characters -->";B
90 PRINT "Number of full-byte characters -->";C
100 END
RUN
Character string --> AD51H@@@@@@@
Overall number of characters ------> 12
Number of half-byte characters --> 10
Number of full-byte characters --> 2
OK
11 - 111
REMARK
See the INSTR, KINSTR and LEN functions, and Section 3.13.3.
:
' Defines the character string
:
' Total number of characters
:
' Number of half-byte characters
:
' Number of full-byte characters
MELSEC-Q
11 - 111

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents