/define
This documentation is archived and is not being maintained.

/define

Defines preprocessor symbols.

/define:name1[=value1][,name2[=value1]]

name1, name2

The name of one or more symbols that you want to define.

value1, value2

Values for the symbols to take. These can be booleans or numbers.

The /define option defines names as symbols in your program.

You can define multiple symbols with /define by using a comma to separate symbol names. For example:

/define:DEBUG,trace=true,max_Num=100

See Conditional Compilation for more information.

/d is the short form of /define.

Compile with /define:xx.

print("testing")
/*@cc_on @*/
/*@if (@xx)
print("xx defined")
@else @*/
print("xx not defined")
/*@end @*/
Show:
© 2016 Microsoft