Main Content

Conditional Inclusions (#if / #endif)

You can generate preprocessor conditional directives in your code by implementing Variant Subsystem blocks in your model. In the generated code, preprocessor conditional directives select a section of code to execute at compile time. To implement variants in your model, see Create a Simple Variant Model. To generate code for variants, see Generate Preprocessor Conditionals for Variant Systems.