[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Changes to m4/doc/m4.texinfo,v
From: |
Eric Blake |
Subject: |
Changes to m4/doc/m4.texinfo,v |
Date: |
Sat, 13 Jan 2007 13:55:38 +0000 |
CVSROOT: /sources/m4
Module name: m4
Changes by: Eric Blake <ericb> 07/01/13 13:55:37
Index: doc/m4.texinfo
===================================================================
RCS file: /sources/m4/m4/doc/m4.texinfo,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -b -r1.91 -r1.92
--- doc/m4.texinfo 12 Jan 2007 23:07:27 -0000 1.91
+++ doc/m4.texinfo 13 Jan 2007 13:55:37 -0000 1.92
@@ -6054,6 +6054,17 @@
The macro @code{mpeval} is recognized only with parameters.
@end deffn
+For the most part, using @code{mpeval} is similar to using @code{eval}:
+
address@hidden options: -m mpeval
address@hidden
+$ @kbd{m4 -m mpeval}
+mpeval(`(1 << 70) + 2 ** 68 * 3', `16')
address@hidden
+`0r24:'mpeval(`0r36:zYx', `24', `5')
address@hidden:038m9
address@hidden example
+
The ratio operator, @samp{\}, is provided with the same precedence as
division, and rationally divides two numbers and canonicalizes the
result, whereas the division operator @samp{/} always returns the
@@ -6072,8 +6083,22 @@
even in @acronym{POSIX} mode, since @code{mpeval} does not have to
conform to the @acronym{POSIX} rules for @code{eval}.
address@hidden fixme - need some examples, but conditional on whether modules
address@hidden and mpeval are both supported
address@hidden options: -m mpeval
address@hidden
+$ @kbd{m4 -m mpeval}
+mpeval(`2 / 4')
address@hidden
+mpeval(`2 \ 4')
address@hidden
+mpeval(`2 || 3')
address@hidden
+mpeval(`1 && 3')
address@hidden
+mpeval(`-1 >> 1')
address@hidden
+mpeval(`-1 >>> 1')
address@hidden
address@hidden example
@node Shell commands
@chapter Macros for running shell commands
- Changes to m4/doc/m4.texinfo,v, Eric Blake, 2007/01/03
- Changes to m4/doc/m4.texinfo,v, Eric Blake, 2007/01/06
- Changes to m4/doc/m4.texinfo,v, Eric Blake, 2007/01/09
- Changes to m4/doc/m4.texinfo,v, Eric Blake, 2007/01/12
- Changes to m4/doc/m4.texinfo,v,
Eric Blake <=
- Changes to m4/doc/m4.texinfo,v, Eric Blake, 2007/01/15
- Changes to m4/doc/m4.texinfo,v, Eric Blake, 2007/01/23