5.1 Type Conversion Functions
5.1.29 String type
→
single-precision real type conversion
5-89
5
APPLICATION
FUNCTIONS
STR_TO_REAL(_E)
STR_TO_REAL(_E)
(2) Both string type data in decimal point form and exponent form can be converted to single-
precision real type data.
(a) Decimal point form
(b) Exponent form
(3) As the number of significant figures of string type data is 6, the 7th and later digits excluding
the sign, decimal point, and exponent part are cut and converted.
(a) Decimal point form
(b) Exponent form
(4) When a sign is not specified or '2B
H' (+) is specified for a sign in decimal point form, string
type data is converted as a positive value. When '2D
H' (−) is specified for a sign, string type
data is converted as a negative value.
(5) When a sign is not specified or '2B
H' (+) is specified for a sign of the exponential part in
exponent form, string type data is converted as a positive value.
When '2D
H' (−) is specified for a sign of the exponential part, string type data is converted as
a negative value.
Single-precision real type
33H(3) 2EH(.)
30
H(0)35H(5)
34
H(4)33H(3)
00
H
31H(1) 2DH(-)
2nd word
3rd word
4th word
5th word
String 1st word
High-order byte Low-order byte
-1.35034
3053.1-4
Single-precision real type
33H(3) 2EH(.)
30
H(0)35H(5)
34
H(4)33H(3)
2D
H(-) 45H(E)
30
H(0)31H(1)
00
H
31H(1) 2DH(-)
2nd word
3rd word
4th word
5th word
6th word
7th word
String 1st word
High-order byte Low-order byte
-1.35034E-10
E43053.1--1 0
Single-precision real type
-1.35034
Cut
30531- 4120 2 3
.
Single-precision real type
-1.35034E-10
Cut
3053.1-412E-1 0