Converts a string into a measure value.
strtofloat( string ) measure value
string
String value to convert.
This example reads a column of 6 values then converts the values to floating point values and then adds the ir values to the &total variable. The total value is subsequently converted back to a string and the result is printed.
define(&total,measure,0.0)
define(&x,integer,0)
for(&x,1,1,6)
set(&total,&total+strtofloat(@(&x,10,18)))
endfor()
show(floattostr(&total))