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 tools, which assume C<end> is opcode #0 so probably 3) or ...
Since exiting may not really be exiting (don't forget, you could be exiting back to the calling embedding program, or back to parrot if you've been called recursively) I think we'd be better off returning a status PMC, which would make me think that option 4, "exit Px" is the way to go, or throwing an exit exception. (Which seems much less nice, but I can see the advantages of being able to trap exit requests from inner methods)
We can leave end with no params as op 0,the plain "I've fallen off the end of the world, figure it out" last-gasp op to catch code that just trots off the end of a bytecode segment as zero-padding is cheap. We can use an alternate op that provides more information as the normal exiting op.
--
Dan
--------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk