zsh-users
 help / color / mirror / code / Atom feed
From: Matthias Berndt <Berndt.Matthias@gmx.de>
To: Mike Hernandez <sequethin@gmail.com>
Cc: zsh-users@sunsite.dk
Subject: Re: Airthmetic confusion...
Date: Tue, 17 May 2005 01:39:22 +0200	[thread overview]
Message-ID: <20050517013922.21a983fb@localhost> (raw)
In-Reply-To: <3060c239050516135933fd2ff6@mail.gmail.com>

On Mon, 16 May 2005 16:59:27 -0400
Mike Hernandez <sequethin@gmail.com> 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


  parent reply	other threads:[~2005-05-16 23:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-16 17:55 Meino Christian Cramer
2005-05-16 20:43 ` Matthias Berndt
2005-05-16 20:59   ` Mike Hernandez
2005-05-16 21:46     ` Dan Nelson
2005-05-17  1:19       ` Mike Hernandez
2005-05-16 23:39     ` Matthias Berndt [this message]
2005-05-17  3:13     ` Meino Christian Cramer
2005-05-17  3:48       ` Bart Schaefer
2005-05-17 11:26         ` Mike Hernandez
2005-05-17 14:57         ` Meino Christian Cramer
2005-05-17  3:14   ` Meino Christian Cramer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050517013922.21a983fb@localhost \
    --to=berndt.matthias@gmx.de \
    --cc=sequethin@gmail.com \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).