stringtofloat

From: Li, Yongzuo <yongzuo.li_at_nyahnyahspammersnyahnyah>
Date: Wed Jun 09 2010 - 17:41:01 MDT

 Hi,

I have a script to test stringtofloat

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"

begin

s = "2008090100"
f = stringtofloat(s)
i = stringtoint(s)

print("string= "+s)
print("float= "+f)
print("int= "+i)

end

The output for float is wrong

(0) string= 2008090100
(0) float= 2.00809e+09
(0) int= 2008090100

Yongzuo

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jun 9 17:41:08 2010

This archive was generated by hypermail 2.1.8 : Fri Jun 11 2010 - 09:33:24 MDT