| | 45 | == Structure of a CIVL-C program |
| | 46 | |
| | 47 | A CIVL-C program is structured very much like a standard C program. In particular, a CIVL- C program may use the preprocessor directives specified in the C Standard, and with the same meaning. A source program is preprocessed, then parsed, resulting in a translation unit, just as with standard C. The main differences are the nesting of function definitions and the new primitives beginning with `$`, which are described in detail in the remainder of this part of the manual. |
| | 48 | |
| | 49 | If the suffix of the filename of the program is not `.cvl`, then the program must include the line |
| | 50 | {{{ |
| | 51 | #include <civlc.h> |
| | 52 | }}} |
| | 53 | somewhere near the beginning (before any CIVL-C primitives are used). This includes the main CIVL-C header file, which declares all the types and other CIVL primitives. |
| | 54 | |
| | 55 | As usual, a translation unit consists of a sequence of variable declarations, function prototypes, and function definitions in file scope. In addition, assume statements may occur in the file scope. These are used to state assumptions on the input values to a program. |