IOS debugging skills-compiler predefined macros
As we all know, Objective-C is a superset of C language and must retain some features of C language. Today, we will use the predefined macros of the compiler to output some information to debug the program.
These macros include:
(1) _ FUNCTION _: // obtain the current method name;
(2) _ func _: // obtain the current
/***1. Macros are simply replaced when the compiler is compiling the source code, without any logical detection, that is, simple code copying. 2. When a macro is defined, the type of the parameter is not considered. 3. The use of a parameter macro causes a block of code with the same effect to have multiple copies in the destination file, which increases the size of the target file. 4. Parameter macros run
The reference count is clever and convenient, but most of the processing processes involve pointers, which are cumbersome and error-prone. To address this problem, Cocos2d-x is accurate for us
A series of auxiliary macros are provided to simplify the Code. These macros are included in the header file "ccplatform Macro. H. Table 2-2 lists the macros related to mem
In iOS development, macro definitions are often used, or some data types are modified with const, and often developers do not know how to use them correctly, resulting in the confusion of macros and const decorations in the project.Can you distinguish between the following? Do you know when to use it?#define Hscoder @"Hansha haha"nsstring *hscoder = @ "Hansha haha"; extern NSString *hscoder; extern const nsstring *hscoder; Static Const NSString *hs
Variadic Macros is function-like macros that contain a variable number of arguments.RemarksTo use Variadic macros, the ellipsis is specified as the final formal argument in a macro definition, and the ReplacemENT identifier __va_args__ May is used in the definition to insert the extra arguments. __va_args__ is replaced by all of the arguments that match the ellip
6. The instructions for macro actions are not required when you use macros, but you can make macros easier to understand and maintain. You cannot use SQL expressions in the Criteria column of a macro. Typically, the direct execution of a macro is just a test. You can either attach a macro to a form, report, or control to respond to an event, or create a custom menu command that executes a macro, after you m
1, click Macros from the Macros submenu on the Tools menu.
2. In the Macro name box, click the macro: an action or a set of actions that you can use to automate tasks. You can record macros in the Visual Basic for Applications programming language. ) is named.
If the macro does not appear in the list, in the Macros i
In the process of making PowerPoint courseware, a courseware often contains multiple slides, and for the sake of the beauty of the courseware, a different picture is inserted into the background in almost every slide. The same insert background image operation repeated n times, it is too tiring. In fact, you can do this quickly by "macros".
Create a new folder named "Background" in any location on your hard disk (such as the F-packing directory). The
1. Overview
After the const keyword is in C + +, the function of the macro definition constants is no longer recommended. This makes the macros seem useless. In fact, the macro can do a lot of things, the author is difficult to enumerate all. Here, just a few typical usage, I hope you can benefit from it.
2. Realize multi-environment compatibility
The common scenario is that we implement a function that wants it to only be satisfied in some kind of
In the final section of VBA learning, I would like to emphasize that to make good use of recording macros, Excel's Help and network search.
In the process of self-study VBA, I often say to use more-learn-think-more and Beginners self-study VBA also three big tools: Recording macros, VBA Help and network search. Make good use of these three kinds of words, many problems do not need the help of others can so
Excel 2013 Macro-enabled methods:
Enabling macros Step 1: Because the interface changes are still relatively large, so here also explains the location, open Office 2013 Excel, if you are not entered by the file, then we click on a "Blank Workbook":
Enable Macros Step 2: Click "File" on the menu bar, then select "Options", and in the Pop-up Options menu, click Trust Center settings in the Trust Cente
Macros in C language are used to indirectly operate the compiling environment.
C language: Before compiling the source program normally, explain some special preprocessing commands to generate a new source program, then perform the normal compilation (to obtain the intermediate file and add the parameter/p ).
In the source program, in order to distinguish preprocessing commands from General C statements, all preprocessing command lines start with a sy
Access using macro control program 3. Use Conditions in macros
Access using macro control program 3. Use Conditions in macros
In some cases, you may want to perform one or more operations in a macro only when the specified condition is true. For example, if a macro is used to verify data in a form, the corresponding information may be displayed to respond to certain input values of the record, and the o
The assert macro prototype is defined in the header file assert. in h, it is used to terminate the execution of the program if the condition following the macro returns false. The macro will call the _ assert_fail function, which first outputs error information to stderr, then, call the abort function to terminate the program execution.
1. assert macro definition
As follows:
[Cpp]# Define assert (expr )\(Expr )\? _ ASSERT_VOID_CAST (0 )\: _ Assert_fail (_ STRING (expr), _ FILE __, _ LINE __, _ A
PowerPoint custom operations to trigger malicious Payload instead of macros
When analyzing recent phishing attacks, we found that attackers started to use PowerPoint custom operations to trigger malicious Payload instead of macros. Although the use of PowerPoint attachments is not new, this attack is still interesting because they can bypass the Office attachments to enable Macro Controllers.
1. Attackers
C languageThe use of macros (macro) in macro C (and C + +) belongs to the scope of compiler preprocessing, which is a compile-time concept (not a run-time concept). The following is a simple summary of the use of macros encountered. About # and # #In a C-language macro, #的功能是将其后面的宏参数进行字符串化操作 (stringfication) is simply to add a double quotation mark to the left and right of the macro variable that it refers
Many Program Personnel do not know C What does "macro" mean? Especially When a macro has Parameters Macro and function are often confused. I want to talk about "macro" here ", Macro only A definition defines a statement block. When a program is compiled, the compiler first needs to execute an action to replace the source program and replace the macro reference with the macro-defined statement block, just like replacing a text file. This action term is "macro expansion ". Using
When writing code yesterday, you must obtain the current Compilation Time in the code to dynamically use the version information. Therefore, some predefined Macros in the C standard are used. Here we will summarize the following macros defined in the C standard:
_ Date _ Date of preprocessing (string text in the form of "Mmm dd YYYY", such as May 27 2006)_ File _ represents the string Text of the curre
An inline function is also called an embedded function.
Program .
Function calling requires the establishment of a stack memory environment, parameter passing, and program execution transfer, which requires some time overhead.
The Inline Function Definition in C ++ is very simple. You only need to add a keyword inline before a common function. In addition, there is no difference (including the function call method) with the ordinary function on the surface ), because of this, in the opinion of
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.