On Thu, Feb 20, 2014 at 04:09:43AM +0200, Константин Бытенский wrote:
> I wanted to use Picolisp as shell script languate and I didn’t find
> out how to get exit status for "call". So I made this patch. I'm new
> for Picolisp.
Right, the exit status is not stored anywhere. Maybe this is a design
error, i.e. returning 'NIL' or a number from 'call' might have been a
better choice. But changing this now would break existing programs.
> Is this patch correct? What name is better for global "*ExitStat"?
> diff --git src64/flow.l src64/flow.l
> index b28857e..9a72ddb 100644
> --- src64/flow.l
> +++ src64/flow.l
> @@ -3235,0 +3236,3 @@
> + shl A 4 # Make short number
> + or A CNT
> + ld (ExitStat) A
> diff --git src64/glob.l src64/glob.l
> index cbf718a..7e19b7c 100644
> --- src64/glob.l
> +++ src64/glob.l
> @@ -182,0 +183 @@
> + initSym ExitStat "*ExitStat" ZERO
Yes, this is correct, and "*ExitStat" sounds suitable to me (though I
would prefer shorter names for system symbols and longer ones for the