1. Hybrid macros.
As styles become more and more complex and require repeated use of large sections of styles, using variables cannot achieve our goal. At this time, the mixed macros will be used.
When using a hybrid macro, you must first declare a hybrid macro. When declaring a hybrid macro, there are two types: A Mixed Macro without parameters and a Mixed Macro with parameters.
1.1Declaration of mixed
ZZ from:http://blog.csdn.net/musein/article/details/742609==================================================The __init and __exit declarations is special kernel macros designed to tell the kernel to flag thesefunctions for special handling in cases where they is compiled in statically rather than included asparts of modules.The __init declaration allows the kernel to reclaim the space used by initializationfunctions, while the __exit declaration tells
Compilation: assemblyGuess: So this macro is related to the assembly?!Reference: Some of the constant macros are referenced by both C and ASM, while C and ASM differ in the processing of the immediate number symbol . In ASM, directives are adopted to differentiate whether the operands are signed or unsigned, rather than through the operands. and C is through the property of the variable, not through the operator. c If you want to indicate that a cons
expansionThe preprocessor expands the macro reference that appears in the source program file into the corresponding macro definition, which is what this article describes as the function of # define, which is done by the preprocessor.The source program processed by the preprocessor differs from the previous source program, where the work performed is purely a substitution and unwinding, without any computational function, so as long as you can really understand this when learning the # define
(1) Parameter passing: macros can be easily inherited before the code variables, functions, inline functions are dependent on the parameters and global variables(2) code generation macros and inline function generation are replaced when there is no stack at the time of the function call, so the execution efficiency will be higher than the function, without the risk of stack overflow, but will generate more
You can create 4 auto-run macros in standard modules in Excel, which are Auto_Open (run automatically when you open the workbook), Auto_Close, Auto_Activate, Auto_Deactivate. These autorun macros are reserved for compatibility with EXCEL5 and 95. You can now replace them with the Open,close,activate,deactivate event of the workbook.So, what is a "standard module"? In fact, the module we inserted in the VBE,
Preface:
Over the past few days, I have looked at the ATL interface ing macro, and then I suddenly came up with the idea of writing it. ATL defines many interface ing macros. Several of them are more important, although it seems that it is not necessary to clarify all its details, however, in the process of deep learning, you can also learn other ATL classes by taking a look at the mechanism of the class. It should be helpful. I wrote it according to
Macros and variable parameters
Let's talk about macros today. What? Can macros also be variable parameters? Yes, you have not heard the error. The macro with parameters is the same as the function, and variable parameters are also supported. The following describes a small program.
CPP Code
# Include
# Include
# Define outscreen (MSG,...) printf (MSG ,_
QT Global Macros and variablesQT Global functions and macros are now collected in the work as followsqt_version: (major Detection version Number:Qt_version_check (major, minor, Patch) ((majorWhen you use namespaces, some macro definitions :Namespace Qt_namespace {}//namespace definition# define QT_PREPEND_NAMESPACE (name):: Qt_namespace::name# define Qt_use_namespace using NAMESPACE:: Qt_namespace;# define
First, let's talk about the following content: ##,__ VA_ARGS __, _ FILE __, _ LINE _, _ FUNCTION _, etc.Macro variable:For example, the above macros are used:
#define myprintf(...) printk("[lch]:File:%s, Line:%d, Function:%s," \ __VA_ARGS__, __FILE__, __LINE__ ,__FUNCTION__);
Here # define is used to replace myprintf () with the next large string of content, while the content of... in brackets is copied to the position of _ VA_ARGS _ as is. The fi
ordinal that distinguishes commands.The value in the "read-write zone" in the command code may be _ioc_none (0 value) indicating no data transfer, _ioc_read (read), _ioc_write (write), _ioc_read|_ioc_write (bidirectional).The kernel defines the 4 macros _io (), _ior (), IOW (), and _IOWR () to assist in generating the above cmd. The following analysis of the implementation of _io (), other similar.
You can see the definition of _io () in asm-ge
Original:Begin_message_map (Cmy1dlg, CDialog)//{{afx_msg_map (CMY1DLG)On_wm_syscommand ()On_wm_paint ()On_wm_querydragicon ()On_bn_clicked (Idc_button1, OnButton1)//}} Afx_msg_mapEnd_message_map ()Afx_msg_map, this macro is an auxiliary macro used by MFC to construct a message map table, buried in a class-aware macro or dynamic recognition macroBegin_message_map (Cmy3view, CFormView)//{{afx_msg_map (Cmy3view)Note-the ClassWizard would add and remove mapping
To learn how to develop the Qt plugin, search for QtPlugins or HowtoCreateQtPlugins in QtAssistant to see the manual introduction. Several macro Q_DECLARE_INTERFACE (ClassName, Identifier) Thismacroassociatesthegiv are involved.
To learn How to develop the Qt plugin, search for "Qt Plugins" or "How to Create Qt Plugins" in Qt Assistant to see the manual introduction.
Several macros are involved.
Q_DECLARE_INTERFACE (ClassName, Identifier)
This macro
1. Macros (macro)wording :${buildpageurl (url2,page.pagenum+1,page)}" > (note: This place can directly call the function in the FTL where the macro is located) next page Introduction Method: Invocation Mode:2. Functions (function)notation: Introduction Method:Invocation Mode:${buildpageurl (url2,page.pagenum+1,page)}3. Different placesMacro: Can be returned early, such as But not Macro, the main role is to splice the content, the macro inside the stri
Run Macros in IDE with shortcuts
If you have not renamed a temporary macro, press Ctrl + Shift + P or select "Run temporarymacro" from the "macro" sub-menu on the "tool" menu to run it. However, even if you have renamed it, you can still access it with a shortcut key. Visual Studio. NET provides one or more key associations (or "bindings") to the shortcut key to call the macro method. When you press the key sequence, a macro is executed. The followin
Auto-assign by macroProgramAdd comments .. add comments to each function, class, and file. because I found some of these things are the same. it also takes time to make comments nice and clear. At this time, we can use macros to help us. for example, I have defined two macros. One is to annotate the file (corresponding to the Hot Key Alt + H), and the other is to annotate the function (corresponding to the
In Noip, macros are often used, so here's a look at the definition and usage of macros in C + +
first Usage--match conditional compilation : #define DEBUG
Defines a identifier called Debug. It should be used in conjunction with #ifdef or #ifndef. Examples are as follows:#define DEBUG#IFDEF debugvoid Print (int v) {cout If the symbol debug is present, then the compiler compiles the above prin
Defining some macros using # define, making some neat substitutions, and even some macros with parameters, are common in Linux C code, which means it's good and useful.But it also has some complicated rules and traps to note, and I'll record some of them for reference only.1, when using "\" To change lines, the second line to shelf write, otherwise there will be more than a space. For example:#define OW "Wh
C + +, the macro substitution is written to a string, but runs at a time inconsistent with expectations.Look at the code first:#define _var_arg_20#define _var_arg_40 (+)#define _var_arg_spec (20-30) Char"Target Pin[_var_arg_20]:value[_var_arg_40]:spec[_var_arg_spec]";Compile no problem, when running, the individual macros in STR are not replaced. The first reaction is that the macro is replaced at the time of precompilation, and there should be no
Source: Ios_ Komatsu
Links: http://www.jianshu.com/p/be00c3f3cafd
We all know that using macros is not only convenient, but also can improve development efficiency. The following summarizes some of the commonly used macros in the iOS development process, which will continue to be added.
Whether the string is empty
#define KSTRINGISEMPTY (str) ([str iskindofclass:[nsnull class]
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.