7 Applied Instructions
7.20 Character String Control
656
FXCPU Structured Programming Manual
(Basic & Applied Instruction)
Cautions
1) When handling array data or character string data in a structured program, a 16-bit device cannot be
specified directly as in the case of a simple project.
Use a label to handle array data or character string data.
Use a global label to specify a device.
2) When handling character codes other than ASCII codes, note the following contents:
a) The number of characters is handled in byte units (8 bits). Accordingly, in the case of character codes
in which two bytes express one character such as shift JIS codes, the length of one character is
detected as "2".
b) When extracting characters from a character string including character codes in which two bytes
express one character such as shift JIS codes, consider the number of characters to be extracted in
units of character codes for one character.
Note that the expected character code is not given if only one byte is extracted out of a 2-byte
character code.
Error
An operation error is caused in the following cases. The error flag M8067 turns ON, and the error code is
stored in D8067.
1) When "00H" is not set within the corresponding device range after a device specified by .
(Error code: K6706)
2) When the value specified by exceeds the number of characters specified by .
(Error code: K6706)
3) When the number of characters specified by " +1" from the position specified by the device specified
by exceeds the device range specified by . (Error code: K6706)
4) When the number of devices after a device number specified by is smaller than the number of
devices required to store extracted characters as many as the number specified by " +1" (that is,
when "00H" cannot be stored after all character strings and the last character) (Error code: K6706)
5) When the contents of the device specified by is a negative value. (Error code: K6706)
6) When the contents of the device specified by " + 1" is "-2" or less. (Error code: K6706)
7) When the contents of the device specified by " + 1" is a number larger than the number of characters
specified by .
(Error code: K6706)