العودة إلى  مدرسة الكمبيوتر   قسم البرمجة    الصفحة الأولى

The #error Conditional Directive

The #error directive takes a string as an argument and produces an error message at compile-time. Errors produced by this directive are displayed as normal compiler errors.

Like the #warning directive, this directive is most useful for detecting pre-defined constraints and inconsistencies during preprocessing of the source file.

Syntax

#error <message string>

The message string identifier shown above indicates the error message to be displayed. The following example illustrates use of the #error directive:

    #if DEBUG 
        ...
    #elif RETAIL
        ...
    #else
       #error DEBUG or RETAIL must be defined!
    #endif

When the error above is encountered, the following line will be output:

    #error 'DEBUG or RETAIL must be defined' (J0500)
 
 طباعة المقال العودة إلى  مدرسة الكمبيوتر   قسم البرمجة    الصفحة الأولى
Syria
سورية
Amrit
عمريت
أرواد
طرطوس
صور من طرطوس
صور من سورية
للسيدات فقط
معجم الكمبيوتر
أدب وفكر
المجلة الطبية
المعلومات العامة
لمحة عن طرطوس
الموضة النسائية
مدرسة الكمبيوتر
 © 2002-2012 LBCInformation Corporation. All rights reserved م حنا عطا لحود.