This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Two questions regarding current guile.


Hello everybody.

First question: Is it possible to load a file and, instead of receiving
#unspecified as return value, receive the value of the last expression
evaluated? My guile reference manual from january states, that gh_load
would do so, but in R5RS it says, the result of load is unspecified, which
is honoured by the current version of guile.

How can I obtain the desired behaviour?


Second question (this one was posted before, but I never got an answer): 

gh_repl calls scm_shell, which does not return to the caller, but calls 
exit() instead. This means, when typing (exit) on the guile prompt not
only the repl is exited, but the whole program is terminated. In 
guile 1.2 gh_repl returned to the caller when (exit) was entered.
 
I have tried to modify guile by simply eliminating the call to exit() in
scm_shell. This allows to return from guile to the calling program, but
when trying to enter guile for the second time, it stops with a stack
overflow error.

Is it really necessary to call exit instead of just returning ?
I'm no scheme guru, so there may be reasons to have it the way it is.
But if not, I'd rather liked it to be the way it was before. 
 
My program has an old but working command shell. With 1.2 I just added a
command to enter guile, and then it was possible to enter
guile and then return back to the old command shell several times.
 
Sure it would be possible to make everything reachable from guile, but
then there are also a bunch of test scripts for the old shell, which would
have to be edited. Further, there are even script-generating scripts,
which I'm happy to have working. --> It would be quite some work to do a
full 'schemification' of the command shell.


Thanks for your answers.

Best regards, 
Dirk Herrmann

--
This message is best viewed with ISO 8859/1 (latin-1) character encoding.