[clean-list] Some questions from a new user

Diederik van Arkel diederik@cs.kun.nl
Mon, 20 Nov 2000 11:23:27 +0100


From: "Paul Moore" <gustav@morpheus.demon.co.uk>
> From: Isabelle [mailto:isabelle.todescato@libertysurf.fr]

> > 2.Console-mode programs behave this way. If you want to
> > control the closing and opening of the console, choose
> > the No Console option for a Start :: * World -> * World
> > project, and control the IO using StdFile functions.
> > Yoy may download the excellent on-line book "Functional
> > Programming in Clean" from the Clean Home Page for
> > relevant explanations.
>
> That's a real shame. Most of the programs I write are console-based
> programs, which I need to act in the "standard" way - that is, run in the
> existing command prompt console, and *not* have a "press enter to quit"
> prompt.
>
> The two options for Clean programs seem to be to have a "press enter"
> prompt, or to run in "no console" mode and open a *separate* console for
> output.
>
> To be honest, without a "normal" console mode, I don't think I will be
able
> to use Clean for the things I want to do :-(
>

Having sneaked a quick look at the console implementation there seems to
be a third option. Compile the program with the console option on, and then
run it from the commandline with the '-nr' flag. This uses your existing
console
and doesn't require the 'anykey'. Unfortunately this stil doesn't work if a
runtime
error occurred or if you have switched on 'Show Execution Time', then it
still asks
for the 'anykey'. If you need this as well it should be possible with a
quick C hack,
mail me if that's what you require.

Regards,

Diederik van Arkel