[clean-list] Termination of console programs under Windows

lethevert lethevert at users.sourceforge.net
Mon Apr 28 15:15:35 MEST 2008


Hello,

I don't know there is such an option, but you can do by rebuilding
runtime modules.

When you download and extract the clean source archive,
open wcon.c and search a function call 'wait_for_key_press().'
That is what you want.
Comment out the line and rebuild and copy resulting *.o files
into Libraries\StdEnv\Clean System Files.

lethevert

2008/4/26, Norbert Zeh <nzeh at cs.dal.ca>:
> I have a problem I found at least two posts about in the mailing list
> archive, but the questions were never answered satisfactorily.  So let me
> try to be very clear about the issue:
>
>  I'm writing a program that outputs stuff to the console but does not
> require console input, ie, a regular command line tool.  The expected
> behavior of such a program is that it does whatever it has to do and
> whenever it is done, it returns to the shell prompt.
>
>  Using the four different settings for console interaction in the project
> options, I can get the following behaviors:
>
>  1. Display of the regular program output + display of final result of
>    computation + wait for input of return key to return to shell prompt.
>
>  2. (No return value) Same as 1 without display of final result.
>
>  3. (No console) All output is placed into a separate console window which
>    closes immediately when the program exits, but nothing appears in the
>    console where I actually started the program from the shell.
>
>  So none of these options give me the behavior I would expect from a command
> line tool.  The question is:  How can I write a program in CLEAN that
> outputs stuff to the console and then returns me to the shell prompt without
> waiting for me to press Enter?
>
>  Note:  I'm running this on Windows (don't know whether this issue exists on
> other OS's) and I'm *not* running it from within the IDE.  I'm invoking the
> final executable from the command line.
>
>  Any help would be greatly appreciated.
>
>  -Norbert
>  _______________________________________________
>  clean-list mailing list
>  clean-list at science.ru.nl
>  http://mailman.science.ru.nl/mailman/listinfo/clean-list
>


More information about the clean-list mailing list