Conditionally Compile Code

  1. Prefix any 4Test statements that are GUI-specific with the appropriate GUI specifier.
  2. Specify the platforms that you want to compile for by entering the appropriate GUI specifiers in the GUI Targets field in the Runtime Options dialog box. You can specify as many GUI targets as you want; separate each GUI specifier by a comma. Setting a GUI target affects which classes are listed in the Library Browser.
  3. To conditionalize code based on the value of constants you define, do the following:
    1. Click Compiler Constants in the Runtime Options dialog box.
    2. The Compiler Constants dialog box is displayed.
    3. Define a constant and specify its value.
    4. Use the constant in your code anywhere you can specify an expression.
  4. Click OK to close the Runtime Options dialog box.