Macro idea is a piece of program code with independent functions in the source program.Macro commands: User-defined commands. During programming, the functions used for multiple times are replaced by a macro command.
Compilation includes commands, pseudo commands, and macro commands. The first two are both defined, and the last one is designed by yourself.
The ad
1. How to view macro development
Before getting started, let's briefly introduce how a macro we define can be expanded in the referenced code. I use Microsoft Visual C ++ 6.0, project menu-> Settings, C/C ++ tabs, and add/P to project options, as shown in 1. Rebuild all will generate a. I file with the same name as. cpp. Open the. I file and you can see how macros are expanded in the code.
Figure 1 1 Add "
Knowledge Points:1. struct structs2.typedef keywords3. Definition of macros4. The difference between a macro and a function5. File inclusion and multi-file compilation6. Conditional compilation===========================Structural bodyThink: If you now want to save a student's information, name, height, age, address, how to saveChar name[64];float height;int age;Char addr[64];1. What is struct structstruct refers to a data structure, which is a kind o
motives
A few days ago to see an interview question: Write a "standard" macro min, this macro enters two parameters and returns the smaller one, which mentions two topic points: knowing how to carefully enclose the arguments in parentheses in a macro is a side effect of a macro, such as what happens when you write the
KDEV_T.H macro Definition ParsingThis header file is not much anyway, the direct reason is--met, just fix it!A variable of type dev_t is defined in Linux/types.h to hold the device number-including the main device number and the secondary device number. Dev_t is a 32-bit number, where 12 bits are used to represent the device number, and the remaining 20 bits are used to represent the secondary device number.Always do not make assumptions about whether
Before this, we understand that the basic operation of Word 2007 is complete, and relative to some of the usual useful to the advanced point of application, small series here also introduced to you several. Working in a Word 2007 document, we sometimes open some files and need to activate the macros.
Upper left office Button-word Option-Trust Center-Trust Center Settings-Enable all macros-OK.
Options
Perhaps a lot of friends will not encounter the "
Use Word2007 to open 2003 of the Word file, if there is a page number, the header will sometimes display a horizontal line, in the word2003 does not show
You can use the macros in the attachment to resolve this problem.
The import steps for the macro are as follows:
1. Open "Development tools" in the word option
2, in the "development tool" face version of the Click "VisualBasic"
3, in the VisualBasic edit window "file" menu to import "Newmacros.
#ifdef DEBUG_IR_RCV
void __imulate (void)
{
Ir_eng.g_ir_state = Ir_start;
ir_eng.g_overflow_cnt = 0;
_irwave.waveid[0] = 9;
_irwave.bitcnt = 0;
_irwave.bits_type_cnt = 0;
Start_capture ()//init infrared wave capture
}
#endif
This macro definition means that the following program is executed as soon as the DEBUG_IR_RCV is defined. Whether the defined DEBUG_IR_RCV is 0 or not 0.
#if DEBUG_IR_RCVvoid __imulate (void){Ir_eng.g_ir_state = Ir_start;i
Include/linux/stringify.h:
#ifndef __linux_stringify_h
#define __LINUX_STRINGIFY_H/
* Indirect stringification. Doing two levels allows the parameter to be a
* macro itself. For example, compile With-dfoo=bar, __stringify (FOO)
* converts to "bar".
* *
#define __STRINGIFY_1 (x ...) #x
#define __STRINGIFY (x. ) __stringify_1 (x)
#endif/ *!__linux_stringify_h * *
Look at the source code above,
__stringify (x ...) the actual expansion of th
Here is a picture of a macro taken with iphone5:How to take a macro picture using iphone5:1. Click on the "Camera" icon on Iphone5 's desktop and turn on the flash function.2. Put the phone camera in front of the object being photographed, about 10 centimeters.3. Press and hold the camera screen, a little pause, the bottom of the interface will appear a AE/AF locking operation Bar, the slider to the right e
#pragma #pragma preprocessing instructionsIn 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
Access this article describes the techniques for using Access's security features and good habits to control access macro viruses.
Anti-virus common skills
It is important to keep your antivirus software updated at all times. New viruses appear every day, anti-virus vendors also through the network, BBS and other carriers to constantly introduce the latest virus database and software, so a focus on security users, should ensure a suitable frequency to
Tags: io os ar for SP strong on CTI AmpIf you've developed anything in the supply chain area, you've most probably come across Inventdimjoin. Invendimjoin is a macro and it's mostly used to narrow the search results for inventory transactions (InventTrans) or INV Entory postings (inventtranspost), but can is used on any table has a inventdimid field.The macro accepts four to five parameters· InventDimId· In
C language Macro definition tips (common macro definitions)Write good C language, beautiful macro definition is important, using macro definition can prevent errors, improve portability, readability, convenience and so on. The following is a list of some mature software commonly used
First, preface
In C-language code or C + + code, macro definition #ifndef ... #define ... #endif主要是为了避免头文件重复引用, how is it a avoidance mechanism? This is related to the scope of the macro definition.
Two, macro definition scope
First, the scope of the macro definition in the C language standard is, starting at the defi
1. Knowledge Point 1.1 macro definition(1) macro definition without parameters1 #define error_message-1002#define seconds_per_day 60*60*60(2) with the parameter macro definition, this form is called the macro function, but actually is not the function#define Outputint (x) cout#define outputchar cout1.2 Inline functions
C language Macro definition summaryTurn from: http://topcool99.ycool.com/post.1797687.html
A macro defines an identifier that represents a specific content.
The preprocessing process replaces the value of the macro identifier that appears in the source code with the macro definition.
The most common use of macros is t
Solo windLinks: C Language macro definitions (2)1. How do I distinguish between macro names and macro strings in a macro definition? What should be noted for macros with parameters?In the macro definition, the macro name and
Introduction to preprocessing Directives1.C language before compiling the source program, some special pre-processing instructions (such as the previous use of the # include directive) to produce a new source program (this process is called the compilation preprocessing), and then the usual compilation2. In order to differentiate between preprocessing directives and generic C statements, all preprocessor directives begin with the sign "#" and end without semicolons3. A preprocessing instruction
Macro with parameters in C Language
1. macros with Parameters
1. The macro definition with parameters is not a simple string replacement, but also a parameter replacement.
Definition Format:
# Define macro name (parameter table) String
1> string contains all the specified parameters in brackets
Eg: # define s (A, B) (a) * (B ))
Area = S (3, 2)
2
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.