Is there a difference between TParallel.&For
and TParallel.For
?
Both can be compiled in Delphi 10 Seattle. so which one should I stick to?
Is there a difference between TParallel.&For
and TParallel.For
?
Both can be compiled in Delphi 10 Seattle. so which one should I stick to?
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.