ChaosPro Home
Introduction
What's New
Palettes
Using Formulas
Layering in ChaosPro
Rendering
Fractal Parameter Windows
Windows
Menu
3D Transformations
Animations
Formula Compiler
Writing Formulas
Language Reference
Introduction
Basic Syntax
Datatypes
Constants
Variables
Expressions
Operators
Functions
Control Structures
Compiler Directives
Overview
#define
#undef
#ifdef-#else-#endif
Functions
Interface to ChaosPro
Special Features, Notes...
Compatibility
Fractal Type Reference
Tutorials
Appendix
CHAOSPRO 4.0
Release 4.0
.

#ifdef-#else-#endif Directives

Syntax:

#ifdef <variable_name>
...
[#else]
...
#endif

These directives allow you to conditionally compile parts of your code: Using the #ifdef directive you can test whether a compiler variable with that name has been defined (either predefined or by using #define). Depending on the definition state you then can conditionally compile formula code.

Notes:
  • Variable names used by the compiler directives have nothing to do with local variables or parameters, even if they have the same name!