The information in this article applies to:
SYMPTOMSIn NMAKE, the caret (^) symbol is used as an escape character for the characters #()$^\{}!@- (which NMAKE uses as control characters). If you create an NMAKE macro that contains one of these symbols, you may, due to context, need to use the caret symbol to indicate that you want the literal character in the macro. MORE INFORMATION
Using ^^ or ^$ gives unexpected results. In some cases, the leading
caret is not removed even though it is needed to get a caret or dollar
sign. However, NMAKE might also remove both characters. According to
the Visual C/C++ for MS-DOS, version 1.0, README.WRI file, if you want
to use $ in a command, then you need to use $$ instead of ^$. The
README.WRI file also notes that if you want to use ^ as a literal
character, it is treated as a literal character when used within a
quoted string.
Sample Makefile #1Note: This makefile does work correctly for NMAKE for MS-DOS, versions 1.3 and later.
Sample Makefile #2
Sample Makefile #3
Since the ^ is treated as a literal character within a quoted string,
you can place the macro definition in a string and then use macro
substitution to remove the quotes. For example,
Additional query words: 1.20 1.30 1.40
Keywords : |
Last Reviewed: October 7, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |