Arc Forumnew | comments | leaders | submitlogin
2 points by CatDancer 5883 days ago | link | parent

Normally Arc will flush all output for you. Thus if you say

  arc> (do (repeat 5
             (pr ".")
             (sleep 1))
           (prn))
you will see a dot being printed every second.

However, it can be inefficient to writing every little string constantly. If you'd prefer to call flush yourself, you can say:

  arc> (declare 'explicit-flush #t)
now Arc won't call flush for you. If you run the above example again, you won't see one dot per second; instead you'll see nothing for five seconds and then all the dots will be printed at once.

Since noisy-each might be called with explicit-flush on, it calls flush to ensure that the dots are printed as it runs. This does no harm when explicit-flush is off.



1 point by thaddeus 5883 days ago | link

I see. Thanks! T.

-----