Alongside Silverfrost Conditional Compilation, FTN95 also offers a C-Style pre-processor. This processor makes use of the standard #if..#endif style of pre-processor directives. This pre-processing operates alongside the Silverfrost pre-processor and is not affected by its use. It is invoked by the use of
on the command line. The command line switches:
/VPARAM <name> <integer>
/DEFINE <name> <integer>
Can be used in conjunction with /CFPP to define values that can be used subsequently within conditional statements. Only integer values are accepted and used as part of the two statements above. Values set as part of these statements can be used interchangeably, that is a value defined by /DEFINE can be compared against one defined with /VPARAM.
The pre-processor can only be used for conditional compilation. Macro substitution is not supported.
#if..#ifdef..#ifndef..#elif..#else..#endif blocks are used to determine which portions of source code should be compiled depending on the logical result of expressions contained within the pre-processor statements
The following pre-processor statements are supported by FTN95:
#define (param-name) [(param-value)]
#include (quoted file name)
Nested single line statements may be constructed such as:
#if MACRO1 && (defined (MACRO2) || MACRO3 > 10)
Statements can be nested over multiple lines also.
Line continuations are not permitted