Example 2: Using pluglets as a macro environment.
例2:将pluglet作为一个宏环境使用。
In the next example, we are going to perform the famous swap! Macro.
在下一个示例中,我们要执行swap !宏。
It would be utilized as shown in this example, which USES the macro to determine the method of writing double quotes in ISO C99 portable code.
对wchar_t的利用如这个示例所示,使用宏确定在ISOC99可移植代码中写双引号的方法。
You have mastered the basics, so let's look at a practical example that combines a push button control with a more complex macro.
您已经掌握了基础技能,因此,让我们看看一个实际示例,结合一个push按钮控件和一个更为复杂的宏。
Now we just need a program to convert our macro into standard C. For this simple example, Perl is used because it can evaluate user code in a string, and its syntax is largely C-like.
现在我们只需要一个程序将这个宏转换成标准的C 语言就可以了。对于这个简单的例子来说,我们将使用Perl 来实现这个程序,因为它可以对字符串中的用户代码进行评测,其语法也与 C 语言非常类似。
On top of these register #define macros, you should also define another macro that dictates whether the ISR will run in simulation mode or in the original interrupt context. For example
在这些寄存器的 #define宏前面,还应该定义另外一个宏,它用来说明 ISR 是在模拟模式中运行还是在原来的中断上下文中运行的。
Each test suite (for example, ts1 in Listing 17) is created by using the macro BOOST_TEST_SUITE.
每个测试套件(比如清单17中的ts1)都是使用BOOST _ test_suite宏创建的。
In GAS, macro arguments are given by name. For example.
在GAS中,宏参数是按名称指定的。
That is, the first argument to a macro is % 1, the second is % 2, the third is % 3, and so on. For example.
也就是说,宏的第一个参数是%1,第二个是%2,第三个是%3,以此类推。
The problem of combining macros with expressions makes macro writing fairly difficult. For example, let's say you had the following macro called MIN that returns the smaller of two values
在表达式中合并宏的问题使得编写宏非常困难。
For example, no business-level process or service view can be obtained if the primary concern is how low-level building blocks, representing technical devices, interconnect at a macro-level.
例如,如果主要的问题是表示技术设备的低级构块如何在宏观层次互连,则无法获得业务层流程或服务视图。
You can also create a list head manually (for example, if your list head is in another structure) through the use of the LIST_HEAD_INIT macro.
也可以通过使用LIST_HEAD_INIT宏手动创建一个列表头(例如,您的列表头位于另一个结构中)。
In the United States, for example, there is recognition of the importance of macro-prudential regulation, but not of giving this authority to the Federal Reserve.
例如,在美国,人们认可宏观审慎监管的重要性,但不表示人们对将此权授予美联储也认可。
Listing 3 gives an example of how the macro will be used.
清单3给出了使用这个宏的示例。
For example, you may want to introduce bindings in your macro that are accessible to the code you are transforming.
例如,可能希望在那些正在转换的代码中绑定这个宏。
For example, let's say that you wanted to create a macro that introduced a variable into a scope that could be used by the person calling the macro.
例如,假设您希望创建一个宏,它将一个变量引入调用宏的人可以使用的范围中。
A third example is the emphasis placed on "building a learning community," which is also elevated to the macro-level as opposed to being buried in the micro - detail, as in the NZCS and IBSTPI models.
第三个例子是关于“建设学习型社区”,在NZCS和IBSTPI模型也被提升到宏观层面,而不是被埋没在微观细节中。
If no such macro is defined for a particular calling convention, it is disabled. Example.
如果没有为某个特殊的调用协定定义该宏,则该调用协定被禁止。例如。
Listing 2 is an example of the macro being used.
清单2给出了一个使用宏的例子。
For example, Part 2 of this series discussed how the Scheme macro system allows an easy mixing of macro and non-macro code.
例如,本系列教程的第2部分就讨论了scheme宏系统如何简单地混合使用宏代码和非宏代码。
The following code example shows how to write a macro that can extract all diagrams from a selected Rational Software Architect model, and then store them in a project.
下面的代码实例显示的是如何编写一个可以从一个选定的RationalSoftware Architect模型中获取所有图然后将它们储存在项目里的宏。
The first line in this tracing example contains the reference to the position, from where the macro expansion was initiated.
在这个跟踪例子中的第一行中有对宏展开初始化时的位置的引用。
For example, Listing 4 is the M4 macro version of a typical sendmail configuration file.
例如,清单4给出了一个典型的sendmail配置文件的m4宏。
Another example is the Inclusion of "faculty workload management" as a macro-level category.
另一个例子是“具备班级管理能力”作为宏观层面的包含范畴。
In this example, you see the use of functions like new-concat and new-compare-criteria, which were created by the defnode macro we called back in Listing 5.
在本例中,您看到了new -concat和new - compare - criteria等函数的用法,它们是由我们在清单5中调用的defnode宏创建的。
After example validating, the macro program wrote with macro instruction system designed in this dissertation can run well in open NC system.
经过实例验证,使用本文设计的宏指令系统编制而成的宏程序,完全可以在开放式数控系统上正确运行。
The following example shows the metadata for a macro community content component.
下面的示例演示宏社区内容组件的元数据。
The action taken by the assembler when it replaces a variable symbol with a value , for example , during the expansion of a macro definition.
汇编程序采用的一种动作,例如在宏定义展开时,它用一个值来代替一个变量符号。
With the help of macro file compiled in APDL under FEM software ANSYS, two example of bridge is analysed and the result is compared with the data obtained by the program analysis.
用APDL编制宏文件,采用有限元软件ANSYS对两个实例进行了分析,并和本文程序分析值进行了结果对比。
Saving macros as a text file makes the code more portable and makes easy to, for example, cut and paste a macro into an email message and share it with others.
将巨集另存为文字档案,使程序码更具有可携性,例如,更容易将巨集剪下和贴到电子邮件及与他人共用。
应用推荐