3 - 45 3 - 45
MELSEC-Q
3 LET'S CREATE AND EXECUTE A PROGRAM
(3) Converting full-byte characters to code equivalents
Each full-byte character has a corresponding JIS code. JIS$ and KNJ$ are used
for conversion between full-byte character and JIS codes. Please note that the
character codes for these functions use character strings.
Example
OK
PRINT JIS$("@")
2422
OK
PRINT KNJ$( "2424" )
OK
Remember that the
character code is a
character string,
not a numeric value.
("@")
JIS$
KNJ$
"2422"
1 character
Character
@
(4) Converting full-byte characters (Kanji characters) and half-byte
characters
There are characters among full-byte characters that are the same type of
characters as half-byte characters (alphabets, numbers, English symbols, and
Katakana). These characters can be converted between full-byte characters and
half-byte characters.
AKCNV$ function is used for converting half-byte characters to full-byte
characters (Kanji characters).
KACNV$ function is used for converting full-byte characters (Kanji characters) to
half-byte characters.
Example
10 A$= " ABC"
20 PRINT AKCNV $(A$)
30 B$= "@ @ @ @ @"
40 PRINT K ACNV$ (B$)
50 END
RUN
ABC
OK
An Illegal Function Call error will be
generated if anything other than
alphabets, numbers, English symbols,
Katakana, or Hiragana characters are
contained in the character string that is
to be converted by the KACNV$ function.
@ @ @ @ @
Содержание 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...