On Thu 14 Mar 2013 05:40, Mike Gran <spk...@yahoo.com> writes:

> In boot-9, a function `quit' is defined.  It appears in the manual,
> but, in boot-9 it can take an argument.  In the manual it never
> takes an argument.
>
> In boot-9, `exit' is aliased to quit.  In the manual `exit' is 
>
> undocumented; however, in the documentation in (rnrs programs),
> it notes that (rnrs programs)'s version of exit is the same
> as the "core" version of exit.
>
> And then there is primitive-exit and primitive-_exit, which are
> described in the manual.
>
> So clearly, there's some confusion here.  Are 'quit' and 'exit'
> supposed to be API?  Is the fact that they can take an argument
> supposed to be documented?
>
> Or is 'primitive-exit' the generally the way to go? 

`primitive-_exit' is the C `_exit' function.  It quits immediately,
without calling atexit() functions.

`primitive-exit' is the C `exit' function.  It runs atexit() functions
and then quits.

The Scheme `exit' function throws `quit', which is handled by the
outermost catch handler, which calls the C `exit' function.  In this way
calling Scheme's `exit' unwinds the dynamic stack.

They should all be documented.

Hope that helps,

Andy
-- 
http://wingolog.org/

Reply via email to