Hi Christophe, > Now I have another similar problem with numbers. > First, I understand the reasons behind having fixpoint numbers > ... > : (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.
In fact, I would not try to explain it with these examples, but work _only_ with scaled integers first. Should be no problem for you as a math teacher. And then explain that the dot is just a read macro, not part of the language machinery per se. > So I'm looking for workarounds. I thought about two. > > The first is a plain Lisp solution, but I would need to hijack the > READer to avoid 1 and 1.0 being different as soon as *Scl > 0. The solution would be to extend the internal representation of numbers, e.g. with an additional bit to distinguish between non-scaled and scaled integers. ♪♫ Alex -- UNSUBSCRIBE: mailto:[email protected]?subject=Unsubscribe
