‎2006 Jun 07 2:48 PM
Hi all,
..very basic question, but I tryed it for hours and only received short-dumps
<b>How can I convert a string into a floating-point number?</b>
Kind regards,
Stefan
‎2006 Jun 07 3:24 PM
Hii
<b>data : a type f,
s type string value '1.023'.
write s to a . " this statement converts string to float
write:/ a .</b>
Regards
‎2006 Jun 07 2:56 PM
hi
try this
to convert string to float.
data : a type f,
s type string value '1.023'.
a = s.
write 😕 a.
to convert float to string.
data : a type f value '1.023',
s type string.
s = a.
write : s.
‎2006 Jun 07 2:56 PM
try this..
report zfloat .
data: y_pack(16) type c,
w_float type f.
*----------------------------------------------------------------------
pack '1234' to y_pack.
w_float = y_pack.
write:/ w_float.
Regards,
Suresh Datti
‎2006 Jun 07 2:57 PM
‎2006 Jun 07 3:00 PM
<b>hi Use MOVE OR ASSIGNMENT FOR THE SAME</b>
i.e, Data : P_ FLOAT TYPE F,
P_STRING TYPE C.
P_STRING = P_FLOAT.
Regards,
Santosh
‎2006 Jun 07 3:13 PM
I already tryed
MOVEbut it dÃdn't work.
Here is my more detailed problem-description:
-db-table with field (type DEC)
-string with value 0,035
How can i write it in the table?
‎2006 Jun 07 3:31 PM
hi
data : temp_field type f.
s type string .
temp_field = s.
<b>dbtab-field = temp_field.</b>
this works fine
plz reward if useful
‎2006 Jun 07 3:24 PM
Hii
<b>data : a type f,
s type string value '1.023'.
write s to a . " this statement converts string to float
write:/ a .</b>
Regards
‎2006 Jun 07 3:32 PM
Thanks, I alreday found my probleM:
I used
3.035instead of
3,035.
Now it works. Thanks for your help!
‎2006 Jun 07 3:40 PM
hi formular
<b>plz check the working of the code before awarding points</b>
@@@the same code has been posted earlier......i guess u hav missed it out
‎2006 Jun 07 3:45 PM
i guess you are right
...but only with the <b>bold</b> format, I saw it
‎2006 Jun 07 3:53 PM
hi again
make sure that the code sample works & reward accordingly .
regards
ganesh