Creates variables used with conditional compilation statements.
Conditional compilation is not supported in Internet Explorer 11 Standards mode and Windows 8.x Store apps. Conditional compilation is supported in Internet Explorer 10 Standards mode and in all earlier versions.
@set @varname = term
Required. Zero or more unary operators followed by a constant, conditional compilation variable, or parenthesized expression.
Numeric and Boolean variables are supported for conditional compilation. Strings are not. Variables created using
Examples of variable declarations look like this:
@set @myvar1 = 12 @set @myvar2 = (@myvar1 * 20) @set @myvar3 = @_jscript_version
The following operators are supported in parenthesized expressions:
* / %
<< >> >>>
< <= > >=
== != === !==
& ^ |
&& | |
If a variable is used before it has been defined, its value is
NaNcan be checked for using the
@if (@newVar != @newVar) ...
This works because
NaN is the only value not equal to itself.
Supported in all versions of Internet Explorer, but not in Windows 8.x Store apps.