NMAKE Help (nmake.hlp) (
Table of Contents;
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
Expressions in Preprocessing
◄Up► ◄Contents► ◄Index► ◄Back►
─────NMAKE──────────────────────────────────────────────────────────────────
The <constantexpression> specified with !IF or !ELSE IF can
contain integer constants, string constants, and commands.
Expressions can be grouped in parentheses. Specify integers in
decimal or C-language notation.
Expressions use C-style signed long integer arithmetic. Numbers
are represented in 32-bit two's-complement form and are in the
range -2,147,483,648 to 2,147,483,647.
Logical Unary Operators
Two unary operators evaluate a condition and return a logical
value of true (1) or false (0):
DEFINED (macroname)
Evaluates to true if <macroname> is defined. Used with !IF or
!ELSE IF, this operator is equivalent to either !IFDEF or
!ELSE IFDEF. However, unlike these directives, DEFINED can be
used in complex expressions using binary logical operators.
EXIST (path)
Evaluates to true if <path> exists. EXIST can be used in
complex expressions using binary logical operators. If <path>
contains spaces, enclose it in double quotation marks (").
Numeric Unary Operators
Integer constants can use the following unary operators:
- numerical negation
~ one's complement
! logical negation
Binary Operators
Constant expressions can use the binary operators listed below. To
compare strings, use the equality (==) operator and the inequality
(!=) operator. Enclose strings in double quotation marks.
+ Addition || Logical OR
- Subtraction << Left shift
* Multiplication >> Right shift
/ Division == Equality
% Modulus != Inequality
& Bitwise AND < Less than
| Bitwise OR > Greater than
^^ Bitwise XOR <= Less than or equal to
&& Logical AND >= Greater than or equal to
-♦-