From c37c7aea611ad9d2e7d2fe1181b6cf8dc7d3e277 Mon Sep 17 00:00:00 2001 From: tg Date: Mon, 23 Mar 2009 12:15:33 +0000 Subject: [PATCH] =?UTF-8?q?document=20somewhat=20surprising=20behaviour=20?= =?UTF-8?q?12:58=E2=8E=9C=20someone=20please=20tell=20me=20why?= =?UTF-8?q?:=20=20=20code=3D1;=20if=20[=20"code"=20-eq=201=20]=20returns?= =?UTF-8?q?=20true=2013:10=E2=8E=9C=20hm=20but=20I=20see=20t?= =?UTF-8?q?he=20problem=2013:10=E2=8E=9C=20code=3D1;=20x=3Dc?= =?UTF-8?q?ode;=20[=20"$x"=20-eq=201=20]=2013:10=E2=8E=9C=20?= =?UTF-8?q?this=20is=20indeed=20unexpected=2013:10=E2=8E=9C=C2=ABpgas:#ksh?= =?UTF-8?q?=C2=BB=20gps23:=20code=3D1+1;[=20"code"=20-eq=202=20]=20&&=20ec?= =?UTF-8?q?ho=20true=20#also=20works=20as=20of=20now,=20we=20consider=2013?= =?UTF-8?q?:13=E2=8E=9C=C2=ABpgas:#ksh=C2=BB=20gps23:=20when=20you=20use?= =?UTF-8?q?=20-eq=20there=20is=20something=20like=20an=20implicit=20$((=20?= =?UTF-8?q?))=20around=20the=20=20=20=20=20=20=E2=8E=9C=20=20=20=20argumen?= =?UTF-8?q?ts=2013:14=E2=8E=9C=C2=ABpgas:#ksh=C2=BB=20[=20code=20-eq=201?= =?UTF-8?q?=20]=20is=20the=20same=20as=20[=20$((code))=20-eq=201=20]=20to?= =?UTF-8?q?=20be=20documented.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mksh.1 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mksh.1 b/mksh.1 index b4388c7..4ead112 100644 --- a/mksh.1 +++ b/mksh.1 @@ -1,4 +1,4 @@ -.\" $MirOS: src/bin/mksh/mksh.1,v 1.151 2009/03/22 18:09:17 tg Exp $ +.\" $MirOS: src/bin/mksh/mksh.1,v 1.152 2009/03/23 12:15:33 tg Exp $ .\" $OpenBSD: ksh.1,v 1.128 2009/03/06 12:28:36 jmc Exp $ .\"- .\" Try to make GNU groff and AT&T nroff more compatible @@ -30,7 +30,7 @@ .el .xD \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 .. .\"- -.Dd $Mdocdate: March 22 2009 $ +.Dd $Mdocdate: March 23 2009 $ .Dt MKSH 1 .Os MirBSD .Sh NAME @@ -3859,6 +3859,9 @@ expr \-a expr Logical AND. ( expr ) Grouping. .Ed .Pp +Note that a number actually may be an arithmetic expression, such as +a mathematical term or the name of an integer variable. +.Pp Note that some special rules are applied (courtesy of POSIX) if the number of arguments to