2-267
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
Data Type Conversion Instructions
2
LrealToFormatString
Example 5: Exponent: TRUE
Sign: TRUE
MinLen: USINT#12
DecPlace: USINT#0
The first decimal place is rounded off because DecPlace is USINT#0. The decimal point is also not
given.
Example 6: Exponent: FALSE
Sign: TRUE
MinLen: USINT#8
DecPlace: USINT#0
Here, no exponent is given and the integer part is only four digits. The first decimal place is rounded off.
Example 7: Exponent: FALSE
Sign: TRUE
MinLen: USINT#2
DecPlace: USINT#0
Here, the number of digits in the integer part of In (four digits) is larger than the value of MinLen
(USINT#2). The four digits of the integer part are given.
The following examples show the relationships between the values of the input variables and the value
of Out when In is LREAL#123456.789.
Example 8: Exponent: FALSE
Sign: TRUE
MinLen: USINT#4
DecPlace: USINT#0
Here, the number of digits in the integer part of In (six digits) is larger than the value of MinLen
(USINT#4). The six digits of the integer part are given. The value of In is positive, so the highest digit is
placed in the sign column.
If the value of In is positive infinity, the value of Out is 'Inf'. If the value of In is negative infinity, the value
of Out is ‘−Inf’. If the value of In is nonnumeric data, the value of Out is “−nan”.
If the value of In is infinity, or nonnumeric data, the value of Out is as shown below.
Value of In Value of Out
+∞
‘inf’
−∞
‘−inf’
Nonnumeric data ‘nan’ or ‘−nan’
- 1 e + 0 3
12
- 1 2 3 5
8
- 1 2 3 5
5
1 2 3 4 5 7
6