Small details of the use of macro definitions in C language _c language

Source: Internet
Author: User
Tags function definition

#pragma #pragma preprocessing instructions
In all preprocessing instructions, the #Pragma instruction may be the most complex, and its role is to set the state of the compiler or instruct the compiler to perform certain actions. #pragma指令对每个编译器给出了一个方法, to give the host or operating system proprietary features, while maintaining complete compatibility with the C and C + + languages. By definition, the compilation instructions are proprietary to the machine or operating system and are different for each compiler.
The format is generally: #Pragma Para
... etc..... etc..

Baike.baidu.com/view/1451188.htm

=======================

Two ways to enforce the use of a function instead of a macro definition:

1: #undef Isalpha

Appears before Isalpha () and still contains <ctype.h> at the top of the file; You can force the compiler to use a function definition.

2: (Isalpha) (c)

The preprocessor does not think of this structure as a macro, but as a function call

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.