autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: expr


From: Akim Demaille
Subject: FYI: expr
Date: 16 Nov 2000 17:19:43 +0100
User-agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands)

2000-11-16  Akim Demaille  <address@hidden>

        * doc/autoconf.texi (Limitations of Usual Tools) <expr>:
        expr 'a' : '\(b\)'.
        From Paul Eggert.

Index: doc/autoconf.texi
===================================================================
RCS file: /cvs/autoconf/doc/autoconf.texi,v
retrieving revision 1.389
diff -u -u -r1.389 autoconf.texi
--- doc/autoconf.texi 2000/11/16 10:12:51 1.389
+++ doc/autoconf.texi 2000/11/16 16:27:39
@@ -5851,6 +5851,12 @@
 Don't use @samp{\?}, @samp{\+} and @samp{\|} in patterns, they are
 not supported on Solaris.
 
+The @sc{posix}.2-1996 standard is ambiguous as to whether @samp{expr 'a'
+: '\(b\)'} outputs @samp{0} or the empty string.  In practice, it
+outputs the empty string on most platforms, but portable scripts should
+not assume this.  For instance, the @sc{qnx} 4.2.5 native @command{expr}
+returns @samp{0}.
+
 Older @command{expr} implementations (e.g. SunOS 4 @command{expr} and
 Solaris 8 @command{/usr/ucb/expr}) have a silly length limit that causes
 @command{expr} to fail if the matched substring is longer than 120



reply via email to

[Prev in Thread] Current Thread [Next in Thread]