Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/m4 Better document eval, mentioning optional second ...
details: https://anonhg.NetBSD.org/src/rev/ff66c62b0983
branches: trunk
changeset: 325817:ff66c62b0983
user: wiz <wiz%NetBSD.org@localhost>
date: Tue Jan 07 13:32:21 2014 +0000
description:
Better document eval, mentioning optional second and third arguments.
Requested by martin.
Bump date.
diffstat:
usr.bin/m4/m4.1 | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diffs (39 lines):
diff -r 77b72108fc54 -r ff66c62b0983 usr.bin/m4/m4.1
--- a/usr.bin/m4/m4.1 Tue Jan 07 13:14:39 2014 +0000
+++ b/usr.bin/m4/m4.1 Tue Jan 07 13:32:21 2014 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: m4.1,v 1.24 2013/07/20 21:40:00 wiz Exp $
+.\" $NetBSD: m4.1,v 1.25 2014/01/07 13:32:21 wiz Exp $
.\" @(#) $OpenBSD: m4.1,v 1.56 2009/10/14 17:19:47 sthen Exp $
.\"
.\" Copyright (c) 1989, 1993
@@ -31,7 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd October 14, 2009
+.Dd January 7, 2014
.Dt M4 1
.Os
.Sh NAME
@@ -256,15 +256,17 @@
Passes its first argument to a shell and returns the shell's standard output.
Note that the shell shares its standard input and standard error with
.Nm m4 .
-.It Fn eval expr
+.It Fn eval expr[,radix[,minimum]]
Computes the first argument as an arithmetic expression using 32-bit
arithmetic.
Operators are the standard C ternary, arithmetic, logical,
shift, relational, bitwise, and parentheses operators.
You can specify
octal, decimal, and hexadecimal numbers as in C.
-The second argument (if any)
-specifies the radix for the result and the third argument (if any)
+The optional second argument
+.Fa radix
+specifies the radix for the result and the optional third argument
+.Fa minimum
specifies the minimum number of digits in the result.
.It Fn expr expr
This is an alias for
Home |
Main Index |
Thread Index |
Old Index