738
15 TYPE CONVERSION FUNCTIONS
15.37 Converting REAL to STRING
• The string data obtained by conversion is output from (d) as follows:
• "00H" is automatically stored at the end (7th word) of the character string.
â– Operation result
1. Function without EN/ENO
The following table lists the operation results.
2. Function with EN/ENO
The following table lists the execution conditions and operation results.
*1 When FALSE is output from ENO, data output from (d) is undefined. In that case, modify a program so that the data output from (d) is
not used.
• The number of digits is fixed respectively for the integer part, decimal part and exponent part as follows: Integer part: 1, decimal part: 5, exponent part: 2
• "20H (space)" is stored in the 2nd byte, "2EH (.)" is stored in the 4th byte, and "45H (E)" is stored in the 10th byte automatically.
• In "Sign data (integer part)", "20H (space)" is stored when the input value is positive, and "2DH (-)" is stored when the input value is negative.
• The 6th and later digits of the decimal part are rounded.
• "30H (0)" is stored in the decimal part when the number of significant figures is small.
• In "Sign data (exponent part)", "2BH (+)" is stored when the input value is positive, and "2DH (-)" is stored when the input value is negative.
• "30H (0)" is stored in the tens place of the exponent part when the exponent part consists of 1 digit.
Operation result (d)
No operation error occurred Operation output value
An operation error occurred Indefinite value
Execution condition Operation result
EN ENO (d)
TRUE (Executes operation) TRUE (Operation error did not occur) Operation output value
FALSE (Operation error occurred)
*1
Indefinite value
FALSE (Stops operation) FALSE
*1
Indefinite value
REAL
-12.3456
"2EH (.)" is stored.
"45H (E)" is stored.
Total number of digits (13 digits)
5432.1-6E+01
(d)
(s)
"20H (space)" is stored.
Exponent part
(2 digits)
Decimal part
(5 digits)
Integer part
(1 digit)
REAL
-12.345678
These digits are rounded off.
Total number of digits (13 digits)
5432.1-6
6
7
78E+01
(d)
(s)
Number of digits of
decimal part (5)
REAL
-12.34
"30H (0)" is stored.
Total number of digits (13 digits)
(d)
(s)
0432.1-0E+01
Number of digits of
decimal part (5)
REAL
-12.3456
"30H (0)" is stored.
Total number of digits (13 digits)
(d)
(s)
5432.1-6E+01
Number of digits of
exponent part (2)