Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Tham khảo tài liệu 'c# 2005 programmer’s reference - chapter 4', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Chapter 4 Declaration Directives Declaration directives are used to define or undefine conditional compilation symbols. The processing of a define directive causes the conditional compilation symbol to become defined starting with the source line that immediately follows the directive. The processing of a undef directive will cause the conditional compilation symbol to become undefined starting with the source line that immediately follows the directive. A define can redefine a conditional compilation symbol that is already defined without the need for an undef directive for that symbol. Conditional Compilation Directives A conditional compilation directive can be used conditionally to include or exclude portions of a C source file. When you use a conditional compilation directive no more than one section of code is processed. The rules for processing are as follows if and elif directives are evaluated in order until one results in true. If an expression is true that section of code is selected. If all directives yield false an else directive if present is selected. In the event that all directives yield false and no else is present no selection is made. Skipped code is not subject to lexical analysis. Diagnostic Directives Diagnostic directives are used explicitly to generate error and warning messages that are reported in the same way as other compile-time errors and warnings. Both warning Check code and terror Code trouble here produce a compile-time error and serve as a reminder that code needs altering. Region Control Directives Region control directives are used explicitly to mark regions of source code. No semantic meaning is attached to any region of code. These regions are for programmers or for use by automated tools. 54 C Language Structure Region control directives are used as follows region endregion This is equivalent to the following if true endif Line Directives Line directives are used to alter the line numbers and source file names reported by the