5-58
5.1 Type Conversion Functions
5.1.19 Single-precision real type
→
string type conversion
REAL_TO_STR(_E)
(2) The character string data after conversion is output from output variable in the following
manner.
(a) The number of digits is fixed respectively for the integral part, decimal part, and
exponent part. (Integral part: 1 digit, decimal part: 5 digits, exponent part: 2 digits)
'2E
H' (.) and '45H' (E) are automatically stored in the 3rd and 9th bytes, respectively.
(b) '20H' (space) is stored in 'Sign data' (integral part) when the input value is positive;
'2DH' (−) is stored when negative
(c) Decimal part is rounded to 5 decimal places.
(d) If the number of significant figures is less, '30
H' (0) is stored to decimal part.
(e) '2B
H' (+) is stored in the 'Sign data' (exponent part) if the exponent is positive; '2DH' (−)
is stored when negative.
(f) '30
H' (0) is stored to tens place in the exponent part if exponent part has only one digit.
(3) '00
H' is automatically stored to the end of the character string (7th word).
d
Single-precision real type
-12.3456
2E
H (.)
45
H (E)
All together 12 digits
Decimal part (5 digits) Exponent part (2 digits)Integral part (1 digit)
5432.1-6E+0 1
Single-precision real type
-12.345678
Rounded off.
All together 12 digits
Decimal part (5 digits)
5432.1- 66
7
7 8E+0 1
Single-precision real type
-12.34
Decimal part (5 digits)
30
H (0)
0432.1- 0 E+0 1
All together 12 digits
Single-precision real type
-12.3456
30H (0)
All together 12 digits
Exponent part (2 digits)
5432.1-6E+0 1