New compiler features
Ultra Fractal 5 contains many compiler and formula language enhancements that make it easier to write large and powerful formulas:
You can now declare your own classes and use them as objects in a formula, like in Java or C#. Classes can be declared in formula files or in separate library files (*.ulb). Classes can inherit from each other to create a class hierarchy. See Classes.
In classes, but also in formulas, you can declare and use functions. Functions can have an optional return value and any number of arguments. Arguments can be of any type, and can also be passed by reference or marked as constant. Static class functions are also supported. See Functions.
Formulas can have plug-in parameters, which allow the user to select any formula plug-in that is compatible with the parameter. A plug-in is actually a class in Ultra Fractal’s formula language, derived from the base class specified by the plug-in parameter. Such a derived class can of course implement many different options, which is a very powerful way to expand the capabilities of a formula even after it has been published. The parameters of the selected plug-in appear under the plug-in parameter and they can be collapsed or expanded. See Plug-in parameters.
- Image parameters
Formulas, typically direct coloring algorithms, can now have image parameters. This is how images can be imported in Ultra Fractal 5. Inside the coloring algorithm, you have full access to the imported image data. The built-in Image class also enables you to create and manipulate stand-alone images. See Image parameters and Image class.
- Dynamic arrays
The compiler now supports dynamic arrays, which can be resized at any time, unlike the static arrays that were available since Ultra Fractal 3. See Dynamic arrays.
- New calculationPurpose predefined symbol
The new #calculationPurpose predefined symbol makes it possible to find out the purpose of a calculation from formula code: for a fractal window, browser preview, or a disk render.
- New rating setting
The new rating setting lets you rate your own formulas, so users can quickly see which of your formulas are recommended and which are not (perhaps because you created a better version later). See rating setting and Formula ratings.
- New isInf and isNaN functions
The new isInf and isNaN functions enable you to determine whether an invalid operation occurred on a floating-point number.
The compiler now always defines the symbol VER50. See Compiler directives.