Share via


/define

Defines preprocessor symbols.

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

Arguments

  • 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.

Remarks

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.

Example

Compile with /define:xx.

print("testing")
/*@cc_on @*/
/*@if (@xx)
print("xx defined")
@else @*/
print("xx not defined")
/*@end @*/

See Also

Other Resources

JScript Compiler Options