{$C PRELOAD} 指令的含义是什么?
我发现这个指令在 Controls.pas(以及其他单元)中声明,我很高兴知道它的含义。
{$C PRELOAD}
据我所知 $C 意味着断言控制,但是 PRELOAD 关键字是什么?是不是类似于“在预加载时断言我”?
我在 Delphi 2009 中找到了这个
谢谢
I found this directive declared in Controls.pas (and also in other units) and I'll be glad to know what does it mean.
{$C PRELOAD}
As far as I know $C means assertions control but what is the PRELOAD keyword ? Is it something like "assert me at preloading time" ?
I found this in Delphi 2009
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
$C
指令称为代码段属性
,与关键字 MOVEABLE、FIXED、DEMANDLOAD、PRELOAD、DISCARDABLE、PERMANENT 结合使用可更改代码段的属性。如果您将
$C
指令与+ 一起使用
或-
您正在使用启用或禁用断言代码的生成。例子 :
The
$C
directive is calledCode segment attribute
and in conjuntion with the keywords MOVEABLE, FIXED, DEMANDLOAD, PRELOAD, DISCARDABLE, PERMANENT changues the attributes of a code segment.if you use the
$C
directive with a+
or-
you are using enabling or disabling the generation of code for assertions.example :
{$C+}
和{$C-}
用于断言。{$C PRELOAD}
是 16 位编程的延续,它在运行时立即将单元的代码段预加载到内存中,而不是等待首先访问该段。当 32 位编程出现时,这在 Delphi 2 中变得不必要,所以我不知道为什么 VCL 源代码仍在使用它。{$C+}
and{$C-}
are for assertions.{$C PRELOAD}
is a carryover from 16-bit programming, where it preloaded the unit's code segment into memory immediately at runtime instead of waiting for the segment to be accessed first. That became unnecessary in Delphi 2 when 32-bit programming came around, so I don't know why the VCL source is still using it.