RE: Hello
- Posted by Bernie Ryan <xotron at localnet.com> Jan 03, 2002
- 437 views
petelomax at blueyonder.co.uk wrote: > Hello all, > > Just joined and already here is my first bozo question: > > I notice there is no float() function. > Am I right in assuming that is the only distinction between the atom() > and integer() functions? I tested it and it seems to be true. > integer('a') returns true as I kind of expected. (& accept to be true) > > Just being curious. > Pete: You can create your own float types by doing this: global type float( atom data ) return ( data >= -3.4E38 and data <= 3.4E38 ) end type -- global type double( atom data ) return ( data >= -1.7E308 and data <= 1.7E308 ) end type -- Then if you can use the float types just like other programming langauges. float f1, f2, f3 f1 = 3.1 f2 = 2.77 f3 = f1 + f2 Bernie