Network Source: http://blog.chinaunix.net/uid-14022540-id-2849095.html
usage of "#" and "# # " in macros
I. GENERAL usageWe use # to turn the macro parameter into a string , and use # # to fit the two macro parameters together . #include #define CONS (A, b) ((int) (a# #e # #b)) #define STR (s) #s int main () {printf ( %s\n " ,str (ABC)); printf ( %d\n ", CONS (2 , 3
Http://blog.163.com/wshyao@126/blog/static/1070451420081018103237836/
# Connector and # Connector
# The Concatenation symbol is composed of two pound signs. Its function is to connect two substrings (tokens) in the macro definition with parameters to form a new substring. But it cannot be the first or last substring. The so-called token refers to the minimum syntax unit that the compiler can recognize. The specific definition has a detailed explanatio
Https://www.jianshu.com/p/7c20b299ee63Traditionally, we've been calling this thing a variable in makefile, which is essentially a macro, just a string substitution. How can we call it a macro?Name of the macroMakefile macros can contain characters, numbers, and underscores. One thing to note is that a macro is a macro,
turn on macro command function
In PowerPoint 2013, for example, the operations of other versions are slightly different.
Click menu: file → options → custom ribbon → main tab, tick "development tools". or find "macros" directly in all commands and add them to the custom menu.
Click the "Development tool" menu, you can see the "Macros" icon in the common toolbar "code"
Enable Macros and enter the appropriate VBA code
Proced
Author: panzhutingThis article describes the characteristics, implementation concepts, and principles of network security emergency response from the perspectives of "looking at emergency response", "Three Views", and "Three Views of emergency response. The article first introduces the unique position and complexity of emergency response in network security, while the macro, medium, and micro aspects of the "three view theory" correspond to the three
Many experts like to use the "macro" command to improve office work efficiency. However, when using macros in Microsoft Office programs, the macro security warning is always displayed, especially when creating a resume table, macros are often used, which makes users feel a lot of trouble each time they open them. If we set the macro security level to "low", we ca
Usage of "#" and "#" in macro
I. general usage
We use # to convert the macro parameter into a string, and # to combine the two macro parameters.
Usage:
# Include # Include Using namespace std;
# Define STR (s) # s
# Define CONS (a, B) int (a ## e ## B) int main ()
{
Printf (STR (vck); // output string "vck"
Printf ("% d/n", CONS (2000); // 2e3 output:
Return 0;
}
First on the source code:The file is portmacro.h, derived from the underlying code in the dynasty project (Nvic Interrupt control section)1 #definePortnvic_int_ctrl_reg (* (volatile uint32_t *) 0xe000ed04ul)2 #definePortnvic_pendsvset_bit (1UL 3 4 5 voidVportyield (void )6 {7 /*Set a PENDSV to request a context switch.*/8Portnvic_int_ctrl_reg =Portnvic_pendsvset_bit;9 Ten /*barriers is normally not required but does ensure the code is completely One within the specified behaviour for the
The difference between a macro and a function:1, the macro does is simple string substitution, is not limited by the type, and the function is the parameter's pass, is limited by the parameter type.2. The macro-body replacement macro name is completed before compiling, and the call to the function parameter is to pass
macro tracking for debuggingThe ANSI standard specifies five predefined macro names:_ Line _ (two underscores), corresponding to % d_ File _ corresponds to % s_ Date _ corresponds to % s_ Time _ corresponds to % s_ Stdc _
Usage of "#" and "#" in macro:Use # To convert macro parameters into a string, and use # to combine two
Label: Ar use SP data on code BS amp ef
Container_of Macro Analysis// The macro is located in include/Linux/kernel. h.
1. Define the format
/**
* Container_of-cast a member of a structure out to the Containing Structure
*
* @ PTR: the pointer to the member.
* @ Type: the type of the container struct this is embedded in.
* @ Member: the name of the member within the struct.
*
*/
# Defin
The macro virus mainly appears in office software office, causing great losses to users. Use the following three methods to stay away from the macro virus (this article uses Word as an example ).First: Set the macro security levelOpen Word and select the "Tools> Options> Security> macro security" command. In this way,
To http://blog.csdn.net/rnamatrix/article/details/5765462
Today, when using the numeric_limits class template functions Max and min in limits, an error occurs during compilation:
[c-sharp] view plaincopyprint?
error C2589: '(' : illegal token on right side of '::'
error C2589: '(' : illegal token on right side of '::'
I was puzzled. Then I suddenly thought that Max and Min may have been defined as macros. So I checked the header file and found that it must be in
Windows. h Includes the
Watch Chen Hao Big Brother blog (http://coolshell.cn/), Learning vim, macro recording magic in my mind lingering, can not help but sigh Vim powerful.
Example:
Macro recording:
qaOperation Sequence
q,
@a,
@@
qaRecord your operations in the registera。
Therefore@aMacro that will replay the recording.
@@Is a shortcut key used to replay the macro of the latest rec
I used to think that the definition of macro is very simple, there is no long macro function, the most commonly used is the definition of Max (), when writing a macro function today, relative to Max (), A little bit longer, and then stepped on a little hole. At the beginning of the definition of the macro function, for
Print? Referrence: Procedure [cpp] macro_expand (MACRO (ARGV) {if (MACRO contain "#") | (MACRO contain "##")) {stringified ARGV | ARGV pasted with other tokens} else if (ARGV is still an macro, which ARGV = NEW_MACRO (NEW_ARGV) {/* that is to say macro_expand (ARGV) ARGV = NEW_MACRO (NEW_ARGV) */macro_expand (NEW_MACRO
How to Use macro definition in C LanguageExplanation of macro replacement in C LanguageFirst, let's look at the following question:# Include
# Define PRINT_CLINE () printf ("% d ",______)
Int main (void)
{
PRINT_CLINE ();
PRINT_CLINE ();
Return 0;
}
Fill in the appropriate code at the horizontal line so that the output of the above Code is 34.
I think most people do not have a c
Generally, there are not many built-in macro packages for software such as texlive installed in Linux, and many macro packages have been installed several years ago, in this way, it is often possible to compile the tex files on the Internet in the near future ~ Of course, you can put the macro package on the Internet directly to the tex file directory... generall
#, # @ And \ symbols in the macro definition of C LanguageSource: Liu shihui Rubby logs
1. # (stringizing) string Operators
Purpose: Convert the input parameter name in the macro definition to a parameter name string enclosed by a pair of double quotation marks. It can only be used in macro definitions with input parameters, and must be placed before the paramet
Macro _ va_args _ of variable parameters in C Language __
1 .#
If you want to include macro parameters in a string, ansi c can do this. In the macro replacement section of the class function,
# The symbol is used as a preprocessing operator to convert the language symbol into a string.
For example, if X is a macro pa
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.