Re: abort() in translated programs
Juergen Luethje wrote:
> my programs often begin like this:
>
> -------------------------------------------------------------->8-------
> include msgbox.e
> constant CMD = command_line()
>
> procedure help()
> integer void
> void = message_box("Usage: myprog <infile>", "Info", MB_ICONINFORMATION)
> abort(1) -- Same effect, whether abort() is placed here ...
> end procedure
>
> if length(CMD) != 3 then
> help()
> -- abort(1) -- ... or here.
> end if
>
> -- Here goes the main program ...
> -------------------------------------------------------------->8-------
>
> Using the interpreter (2.3 or 2.4 Beta), this snippet runs as expected.
> Using the translator (2.3 or 2.4 Beta), and the Borland C++ 5.5
> Command-line Compiler, at the end of the program a console window pops
> up, with one blank line, and "Press Enter..." on the second line.
>
> I'm just making my first steps with the translator. What happens here?
There may be a slight incompatibility there.
What happens if you say:
abort(0)
instead of
abort(1)
As I recall, the Translator may have an extra feature
where it gives you a prompt when the abort code is
non zero, before it closes the window.
Regards,
Rob Craig
Rapid Deployment Software
http://www.RapidEuphoria.com
|
Not Categorized, Please Help
|
|