English 中文(简体)
参考文献
原标题:Delphi constants and references

我想不断提及德尔菲斯的职能,因此我确信,参考对象赢得了变革,节省了时间和记忆。 因此,我要宣布这样的职能。

function foo(var const Value : Bar) : Boolean;

但不允许这样做。 我认为,固定的数值将自动作为参考。 然而,我发现,情况并非如此(在把物体发送到该功能之前,该物体的地址给我12F50C,同一物体在该功能内的地址是12F564)。

我能做些什么来不断提到?

最佳回答

Function Foo(Const Value:Bar):Boolean 超越了“最高效”方式的价值,对大型物体而言,这种照旧,但较小的物体倾向于以价值通过。

对这一问题的答复更为详细......

注:通过一个标号为const的参数 但这并不意味着它会发生改变,它只是说,汇编者赢得笔,让你直接改变它。

问题回答

暂无回答




相关问题
determining the character set to use

my delphi 2009 app has a basic translation system that uses GNUGetText. i had used some win API calls to prepare the fonts. i thought it was working correctly until recently when someone from Malta ...

Help with strange Delphi 5 IDE problems

Ok, I m going nuts here. For the last (almost) four years, I ve been putting up with some extremely bad behavior from my Delphi 5 IDE. Problems include: Seemingly random errors in coride50.bpl ...

How to write a Remote DataModule to run on a linux server?

i would like to know if there are any solution to do this. Does anyone? The big picture: I want to access data over the web, using my delphi thin clients. But i´would like to keep my server/service ...

How convert string to integer in Oxygene

In Delphi, there is a function StrToInt() that converts a string to an integer value; there is also IntToStr(), which does the reverse. These functions doesn t appear to be part of Oxygene, and I can ...

Quick padding of a string in Delphi

I was trying to speed up a certain routine in an application, and my profiler, AQTime, identified one method in particular as a bottleneck. The method has been with us for years, and is part of a "...

热门标签