Is there a difference between TParallel.&For and TParallel.For?

陌路散爱 提交于 2019-12-01 03:57:19

The method definition for TParallel.&For requires the ampersand to escape a reserved word (for). You don't need to use it when calling the method except in cases where there would be ambiguity.

For example :

 with TParallel do begin
    &For(...)  // etc 
 end;

I can't imagine why you would ever want to do that, however.

If it were in one of your own classes, mind you, any internal calls to an escaped method would require either the ampersand or an explicit class or instance (self) identifier.

TParallel is a sealed class, so the point is moot in this case. You will never be working within it or within a descendent class.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!