Unit 'Contnrs' Package
[Overview][Constants][Types][Classes][Procedures and functions][Index] [#fcl]

TCustomBucketList.ForEach

Loop over all items.

Declaration

Source position: contnrs.pp line 567

public function TCustomBucketList.ForEach(

  AProc: TBucketProc;

  AInfo: Pointer = Nil

):Boolean;

function TCustomBucketList.ForEach(

  AProc: TBucketProcObject

):Boolean;

Arguments

AProc

  

Callback handler to call for each item in the list.

AInfo

  

Extra info to pass to the procedural variant of the method.

Function result

True if all items were processed, False if the loop was stopped.

Arguments

AProc

  

Callback handler to call for each item in the list.

Description

Foreach loops over all items in the list and calls AProc, passing it in turn each item in the list.

AProc exists in 2 variants: one which is a simple procedure, and one which is a method. In the case of the simple procedure, the AInfo argument is passed as well in each call to AProc.

The loop stops when all items have been processed, or when the AContinue argument of AProc contains False on return.

The result of the function is True if all items were processed, or False if the loop was interrupted with a AContinue return of False.

Errors

None.

See also

TCustomBucketList.Data

  

Associative array for data pointers.


Documentation generated on: Dec 26 2024