Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Airthmetic confusion...
- X-seq: zsh-users 8836
- From: Matthias Berndt <Berndt.Matthias@xxxxxx>
- To: Mike Hernandez <sequethin@xxxxxxxxx>
- Subject: Re: Airthmetic confusion...
- Date: Tue, 17 May 2005 01:39:22 +0200
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <3060c239050516135933fd2ff6@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20050516.195529.74749456.Meino.Cramer@xxxxxx> <20050516224332.246839a4@localhost> <3060c239050516135933fd2ff6@xxxxxxxxxxxxxx>
On Mon, 16 May 2005 16:59:27 -0400
Mike Hernandez <sequethin@xxxxxxxxx> wrote:
> Actually what happens is that the operation and assignment are
> performed but the return code of the expression evaluates to 1, which
> is an error. I tried on my machine and get the same results:
>
> (mike@mhernandez)(24/pts)(04:45pm:05/16/05)-
> (%:~)- (( x = 0 ))
> (mike@mhernandez)(25/pts)(04:46pm:05/16/05)-
> (%:~)- echo $?
> 1
> (mike@mhernandez)(26/pts)(04:46pm:05/16/05)-
> (%:~)- echo $x
> 0
I hope, I don't missunderstood ... the first posting, but 'echo $x' is
'0'. So the value of 'x' is calculated correctly, but the returncode is
false.
> There must be a reason why assigning 0 to a variable is considered an
> error (a reason which I could speculate about, but don't know for
> sure).
Are you sure there is a reason or isn't it probably a bug?
Matthias Berndt
Messages sorted by:
Reverse Date,
Date,
Thread,
Author