Hi Jon,

> I just noticed that doing the (prin "-> ") before the (eval Exe)
> causes the arrow to be printed before the first printed line, e.g. when
> entering an expression like (for N 3 (prinl N)). Instead, the arrow
> should appear just before the final result.
> I have now ended up with this:
> 
> (in NIL
>  (use Res
>    (until (eof)
>      (setq Res
>        (let @ Res
>          (eval (read)) ) )
>      (prin "-> ")
>      (println Res)
>      (flush) ) ) )

Yes, right. That's better.

The (flush) at the end is actually not needed, because the end-of-line
in 'println' flushes the output automatically. However 'prin' does not,
so I would move the (flush) up:

   (prin "-> ")
   (flush)
   (println Res) ) ) )

This is critical only when printing the result takes a long time. You
see that, for example, if you calculate a big number which takes time to
convert upon output.

   : (** 10000 10000)

The "-> " appears immediately due to the (flush), but the digits 1000...
only after a second or so.

♪♫ Alex
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to