Compiler directives

Compiler directives enable you to conditionally compile or leave out entire blocks of code. Here is a list of all compiler directives:

With compiler directives, it is easy to have two different versions of a formula. For example, you might have a version that is used for testing and debugging, and a final version. Let's assume the test version needs to show a different title. The following code would accomplish this:

$define Test
...
default:
$ifdef Test
  title = "My Formula (test version)"
$else
  title = "My Formula"
$endif

Compiler directives enable you to switch between both versions by simply removing or inserting the $define statement at the top of the formula. (Note that in this example, the browsers will display the first title regardless of the compiler directives that are defined.)

Ultra Fractal 6 always defines the following symbols: ULTRAFRACTAL, VER20, VER30, VER40, VER50 and VER60. With the VERxx symbols, you can write formulas that take advantage of features in e.g. Ultra Fractal 5 but still compile under Ultra Fractal 4 or 3, where VER50 or even VER40 is not defined. Ultra Fractal 7 will define VER70. Example:

default:
  param ExtraMagnification
    caption = "Extra Magnification"
$ifdef VER40
    ; In Ultra Fractal 4 and later, make sure this parameter is 
    ; interpolated exponentially by default. 
    exponential = true
$endif
  endparam

Notes

See Also
Compatibility
Exponential interpolation