cpp/preprocessor/error — различия между версиями
Материал из cppreference.com
< cpp | preprocessor
P12bot (обсуждение | вклад) м (Use {{lc}}. Update links. Various fixes.) |
Olya (обсуждение | вклад) |
||
Строка 1: | Строка 1: | ||
− | |||
{{title|Error directive}} | {{title|Error directive}} | ||
{{cpp/preprocessor/navbar}} | {{cpp/preprocessor/navbar}} | ||
− | + | Shows given message and renders program ill-formed. | |
+ | |||
+ | |||
− | |||
{{sdsc begin}} | {{sdsc begin}} | ||
{{sdsc | {{ttb|#error}} {{spar|error_message}} }} | {{sdsc | {{ttb|#error}} {{spar|error_message}} }} | ||
{{sdsc end}} | {{sdsc end}} | ||
− | === | + | ====== |
− | + | ||
+ | After encountering {{tt|#error}} directive, diagnostic message {{spar|error_message}} and the program ill-formed (the compilation ). | ||
− | + | ''error_message'' can consist of several words not necessarily in quotes. | |
− | === | + | ====== |
− | + | {{ | |
+ | | | {{|directive }} | ||
+ | }} | ||
− | + | arcsdeenesfritjaplptzh | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + |
Версия 06:20, 10 сентября 2021
Shows the given error message and renders the program ill-formed.
Syntax
#error error_message
|
|||||||||
Explanation
After encountering the #error
directive, an implementation displays the diagnostic message error_message and renders the program ill-formed (the compilation stops).
error_message can consist of several words not necessarily in quotes.
See also
Документация C по
error directive |