- 为什么会显影剂使用宏?
- 使用它们的优点和缺点是什么?
- 在哪里可以找到一些资源以及如何使用它们?
宏是一个非常广泛的术语.在C ++中,例如,有宏例如这些.从软件开发的角度来看,它们使您可以使用这些便捷宏(例如__FILE__)来完成某些事情,例如获取当前源文件的名称等.
Macros is a pretty broad term. In C++, for example, there are macros such as these. From a software development perspective, they allow you to use these convenience macros (__FILE__, for example) to do certain things, like get the name of the current source file, etc.
还有一些击键宏,您可以在编辑器中记录这些宏.举例来说,如果你要编辑一个文件的每一行,并用引号括起来,你可以录制一系列按键来做到这一点,然后保存"宏向一个键.然后,您可以按该键,它将执行您刚刚为文件中的每一行保存的所有击键.
There are also keystroke macros you can record in an editor. For example, if you are going to edit each line of a file and surround it with quotes, you could record a series of keystrokes to do that, and then "save" the macro to a single key. Then you could press that key which would execute all the keystrokes you just saved for each line in the file.
更多推荐
开发人员为什么要使用宏?
发布评论