next up previous
Next: C Preprocessor Directives NOT Up: Preprocessor directives Previous: #ifdef - #ifndef -

#echo - #error

The #echo and #error directives allows outputs the remainder of the input line to the standard input device. It was developed to allow informational messages, warning, and error messages to be presented to the user when processing the input file. used in

/* simple echo example */
#define ONE 
#ifdef ONE              // Check of ONE is defined
#echo ONE is defined    // Output Informational message 
#elseif TWO            
#echo TWO is defined
#else
#error ***** WARNING ***** Neither ONE of TWO is defined ******
#endif
This results in ``ONE is defined'' being echoed to the users screen.



Jeff Siebers X88554
Mon Apr 21 09:12:07 PDT 1997