‎2008 Feb 26 1:59 PM
Hi,
How can i convert a type f variable into a type p decimals 2 variable?
I'm trying to make this division:
var type f.
var1 type p decimals 2
var = 50 / 100.
the result is:
var = 5.0000000000000000E-01
if i do
move var to var1.
the result is:
var1 = 0.01 ???
can anyone tell me what i'm doing wrong?
‎2008 Feb 29 2:31 PM
Hi,
I checked your sample below. var1 gave me 0.50 answer. which is also same as var1 = 50 / 100 (result 0.50). what result you are looking for based on your sample?
cheers,
‎2008 Feb 26 2:04 PM
‎2008 Feb 26 2:55 PM
DATA: var type f,
var1 type p decimals 2.
var = 50 / 100.
WRITE:/ var.
move var to var1.
WRITE:/ var1.
Result is: 0.50
I don't see what's your problem...
Greetings,
Blag.
‎2008 Feb 26 3:02 PM
There is nothing wrong in the coding ..
I get 0.5 in var1
data : var type f,
var1 type p decimals 2 .
var = 50 / 100.
write 😕 var .
move var to var1.
write 😕 var1 .
‎2008 Feb 29 2:31 PM
Hi,
I checked your sample below. var1 gave me 0.50 answer. which is also same as var1 = 50 / 100 (result 0.50). what result you are looking for based on your sample?
cheers,