Hi,
I know, it is not wise to close the current-input-port. However, I
wished scsh (scheme48?) would react differently and would not create
an heap overflow. Terminating with an error message would be
sufficient in my opinion.
What do you think?
Andreas.
[andreas@hgt project-3]$ scsh
Welcome to scsh 0.6.6 (RC 2)
Type ,? for help.
> (close (current-input-port))
>
Error: exception
wrong-type-argument
(peek-char '#{Input-fdport #{Closed-channel "standard input"}})
1>
Error: exception
wrong-type-argument
(peek-char '#{Input-fdport #{Closed-channel "standard input"}})
2>
Error: exception
wrong-type-argument
(peek-char '#{Input-fdport #{Closed-channel "standard input"}})
...
and so on up to some number greater than 500 on my system.
|