开发人员为什么要使用宏?

编程入门 行业动态 更新时间:2024-10-09 16:31:24
本文介绍了开发人员为什么要使用宏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述
  • 为什么会显影剂使用宏?
  • 使用它们的优点和缺点是什么?
  • 在哪里可以找到一些资源以及如何使用它们?
推荐答案

宏是一个非常广泛的术语.在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.

更多推荐

开发人员为什么要使用宏?

本文发布于:2023-11-23 07:08:50,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1620557.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:开发人员   要使

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!