Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP C/HP-UX Reference Manual: HP-UX Systems > Chapter 7 Preprocessing Directives

Error Directive (#error)

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

Syntax

#error [pp-tokens]

The #error directive causes a diagnostic message, along with any included token arguments, to be produced by the compiler.

Examples

#ifndef (HP_C)
#error "HP_C not defined!" /* This directive will produce
#endif the diagnostic message "HP_C
not defined!" */

#if TABLE_SIZE % 256 != 0
#error "TABLE_SIZE must be a multiple of 56!"
#endif /* This directive will produce
the diagnostic message
"TABLE_SIZE must be a
multiple of 256! */

NOTE: The #error directive is only supported in ANSI mode.
Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.