Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: N=5 echo $[N-1] why doesn't it work as expected
- X-seq: zsh-users 14236
- From: Miek Gieben <miek@xxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: N=5 echo $[N-1] why doesn't it work as expected
- Date: Fri, 17 Jul 2009 09:39:15 +0200
- In-reply-to: <tkrat.e1ca3b460deca95d@xxxxxxxxxxxxxxxxxxx>
- Mail-followup-to: zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <tkrat.e1ca3b460deca95d@xxxxxxxxxxxxxxxxxxx>
[ Quoting Helmut Jarausch in "N=5 echo $[N-1] why doesn't it work"... ]
> Hi,
>
> sorry for this very simple question.
>
> N=2
> N=5 echo $[N-1]
> displays 1 - I'd expected 4.
> Would anybody please explain why?
$N is evaluated first, so it says:
N=5 echo $[2-1]
grtz Miek
Attachment:
signature.asc
Description: Digital signature
Messages sorted by:
Reverse Date,
Date,
Thread,
Author