Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

8.3.3 Evaluation Macros

The following macros give some control over the order of the evaluation by adding or removing levels of quotes. They are meant for hard-core M4 programmers.

— Macro: m4_dquote (arg1, ...)

Return the arguments as a quoted list of quoted arguments.

— Macro: m4_quote (arg1, ...)

Return the arguments as a single entity, i.e., wrap them into a pair of quotes.

The following example aims at emphasizing the difference between (i), not using these macros, (ii), using m4_quote, and (iii), using m4_dquote.

     $ cat example.m4
     # Overquote, so that quotes are visible.
     m4_define([show], [$[]1 = [$1], $[]@ = [[email protected]]])
     m4_divert(0)dnl
     show(a, b)
     show(m4_quote(a, b))
     show(m4_dquote(a, b))
     $ autom4te -l m4sugar example.m4
     $1 = a, [email protected] = [a],[b]
     $1 = a,b, [email protected] = [a,b]
     $1 = [a],[b], [email protected] = [[a],[b]]

 
 
  Published under the terms of the GNU General Public License Design by Interspire