Table of Contents

TCodeForEachStatement.Create Constructor

Creates a for-each statement with the specified components.

Syntax

Unit: Bcl.Code.MetaClasses

constructor TCodeForEachStatement.Create(const AVarName: string; AExpression: TCodeExpression; AStatements: TArray<TCodeStatement>; ADeclareVar: Boolean = False);

Parameters

<-> Parameter Type Description
const AVarName string The iteration variable name.
AExpression TCodeExpression The collection expression to iterate over.
AStatements TArray<TCodeStatement> The statements in the loop body.
ADeclareVar Boolean Optional: Default value is False

If True, declares the iteration variable inline.

See also