Re: program exit code

2003-08-24 Thread Dan Sugalski
At 12:09 PM +0200 8/24/03, Leopold Toetsch wrote: Parrot programs have commandline info in P0 but there is no means to communicate an exit-status to the shell. We could do: 1) REG_INT(5) ...has exit code 2) end Ix ... end opcode has exit code 3) exit_code Ix .. set exit code 1) breaks existing pr

Re: program exit code

2003-08-24 Thread Jos Visser
On Sun, Aug 24, 2003 at 03:19:37PM +0100 it came to pass that Nicholas Clark wrote: > > > 1) REG_INT(5) ...has exit code > > I like the idea of (1), but I'm used to C. It seems quite clean if the > top level subroutine just "returns" to its caller, which happens to be > the shell. C (and perl) can

Re: program exit code

2003-08-24 Thread Gordon Henriksen
On Sunday, August 24, 2003, at 10:19, Nicholas Clark wrote: IIRC someone said that in python to exit (in what sounds like this fashion) you just raise a system.exit exception. By default it gets caught by the caller of your main routine, and your program exits. But you can trap the exception, a

Re: program exit code

2003-08-24 Thread Nicholas Clark
On Sun, Aug 24, 2003 at 01:07:48PM +0200, Jos Visser wrote: > On Sun, Aug 24, 2003 at 12:09:21PM +0200 it came to pass that Leopold Toetsch wrote: > > Parrot programs have commandline info in P0 but there is no means to > > communicate an exit-status to the shell. > > We could do: > > > > 1) REG_

Re: program exit code

2003-08-24 Thread Jos Visser
On Sun, Aug 24, 2003 at 12:09:21PM +0200 it came to pass that Leopold Toetsch wrote: > Parrot programs have commandline info in P0 but there is no means to > communicate an exit-status to the shell. > We could do: > > 1) REG_INT(5) ...has exit code > 2) end Ix ... end opcode has exit code > 3) ex

program exit code

2003-08-24 Thread Leopold Toetsch
Parrot programs have commandline info in P0 but there is no means to communicate an exit-status to the shell. We could do: 1) REG_INT(5) ...has exit code 2) end Ix ... end opcode has exit code 3) exit_code Ix .. set exit code 1) breaks existing programs but fits calling conventions 2) could break