Hi Christophe, > Christophe Gragnic <[email protected]> writes: > : (scl 1) # just for some examples to show > -> 1 > : 1 > -> 1 > : 1.0 > -> 10 > : (* 1.0 1.0) > -> 100 > : (+ 1 1.0) > -> 11 > > It's is just impossible for a teacher to explain this to a newbie > without being considered a fool. PicoLisp being cool nonetheless.
this is a picolisp feature. See http://software-lab.de/doc/ref.html#num-io Formatted output of scaled fixpoint values can be done with the format and round functions: picolisp has integers only. It has no way of distinguishing what is an integer and what is a "floating point number" because there are only integers. All this stuff with 'scl' and *Scl is just a convenience hook into the reader to deal with numbers which have '.' character in it and transform it into an integer as if it was a fixed point number. > : (* 1.0 1.0) > -> 100 You want: (*/ 1.0 1.0 1.0), see http://software-lab.de/doc/ref_.html#*/ Cheers, Tomas -- UNSUBSCRIBE: mailto:[email protected]?subject=Unsubscribe
