2007 Sep 04 11:57 AM
Hi all,
I am getting the the output from a function nodule as 1.0000000000000000E+00
I am want to convert this output to 1 or accordingly.can anybody suggest
a way...
helpful answers will be rewarded
Regards,
jinesh
2007 Sep 04 11:59 AM
hi,
assign that value to a variable to type i.
thanks,
praveena
move it to a variable of following type
p decimals 0.
2007 Sep 04 11:59 AM
hi,
assign that value to a variable to type i.
thanks,
praveena
2007 Sep 04 12:00 PM
2007 Sep 04 12:01 PM
2007 Sep 04 12:05 PM
Hi
<b>WRITE: V_FLOAT EXPONENT 0.</b>
THIS WILL GIVE U THE SOLUTION.
<b>REWARD IF HELPFUL</b>
2007 Sep 04 12:06 PM
HI,
try this code:
DATA : STR TYPE STRING VALUE '123.00000000000'.
SHIFT STR RIGHT DELETING TRAILING '0'.
REPLACE '.' WITH '' INTO STR.
WRITE STR.
out put is 123.
do reward points if it helps
rgds
2007 Sep 04 12:17 PM
hi check this code:
DATA : V_FLOAT TYPE F VALUE '2456.00000000',
V_CHAR(25),
P10_4(10) TYPE P DECIMALS 8.
data str type string.
CALL FUNCTION 'CEVA_CONVERT_FLOAT_TO_CHAR'
EXPORTING
FLOAT_IMP = V_FLOAT
FORMAT_IMP = P10_4
ROUND_IMP = ' '
IMPORTING
CHAR_EXP = V_CHAR.
WRITE : V_CHAR.
str = v_char.
SHIFT STR RIGHT DELETING TRAILING '0'.
REPLACE '.' WITH '' INTO STR.
WRITE STR.
first a variable is converted from float to character using the fm.
the output is 2456.
plz reward points if it helps.
rgds.
2007 Sep 07 9:41 AM
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |