From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: Gaspar Bakos <bakos@cs.elte.hu>, zsh-users@sunsite.auc.dk
Subject: Re: evaluating a condition
Date: Sun, 12 Sep 1999 23:51:39 +0000 [thread overview]
Message-ID: <990912235140.ZM23741@candle.brasslantern.com> (raw)
In-Reply-To: <Pine.LNX.3.96.990912203255.17690A-100000@neumann.cs.elte.hu>
On Sep 12, 8:41pm, Gaspar Bakos wrote:
} Subject: evaluating a condition
}
} I have the following script, and I would like to print the numbers in the
} terminal from ${min} to ${max}, if both of them are smaller than 10.
At first I thought you'd found a bug in the math parser, but:
} export min=$3;export max=$4;
} if (($[min]<10 && $[max]<10)) then
^^
There's a metafied space here. I think zsh is interpreting "\240$[max]" as
an identifier; e.g. if max=11, the identifier name is "\240\061\061". That
identifier isn't defined, so it's value is 0 which is always < 10.
} for i in {${min}..${max}}; do echo $i; done
} fi
This is a danger of permitting identifiers to contain non-ascii characters.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
next prev parent reply other threads:[~1999-09-12 23:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-09-12 18:41 Gaspar Bakos
1999-09-12 23:51 ` Bart Schaefer [this message]
1999-09-13 16:35 ` Sweth Chandramouli
1999-09-13 17:22 ` Bart Schaefer
1999-09-13 7:20 ` Johannes Mähner
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=990912235140.ZM23741@candle.brasslantern.com \
--to=schaefer@candle.brasslantern.com \
--cc=bakos@cs.elte.hu \
--cc=zsh-users@sunsite.auc.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).