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

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

Both can be compiled into the Delphi 10 Seattle. so what should i stick with?

+8
delphi delphi-10-seattle
source share
1 answer

The method definition for TParallel.&For requires the ampersand to leave the reserved word ( for ). You do not need to use it when calling a method, unless there is ambiguity.

For example:

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

I can’t imagine why you would ever want to do this.

If this were in one of your own classes, remember that any internal calls to the escaped method will require either an ampersand or an explicit class or instance identifier ( self ).

TParallel closed class, so the point is controversial in this case. You will never work in it or in a descendant class.

+14
source share

All Articles