在delphi中使用inline关键字是什么 [英] what is use of inline keyword in delphi

查看:138
本文介绍了在delphi中使用inline关键字是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以说在delphi中使用内联关键字是什么

can any one please say what is use of inline keyword in delphi

推荐答案

这向编译器暗示了函数/过程应该(如果可能)内联,即,当您调用它时,应该像宏一样扩展而不是被调用。

It is a hint to the compiler that the function/procedure should be (if possible) inlined, ie when you call it it should be expanded like a macro instead of being called.

)的小功能,其中调用的开销会很大。您会在例如windows.pas

This is an optimization for (very) small functions where the overhead of a call would be significant. You will find many examples in for example windows.pas

中找到许多示例。实际发生的情况取决于函数的复杂性,公共/私有访问权限以及您的Delphi版本。

What actually happens depends on the complexity of the function, public/private access and your Delphi version.

这篇关于在delphi中使用inline关键字是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆