TCodeForStatement.Create Constructor
Creates a for loop statement with the specified components.
Syntax
Unit: Bcl.Code.MetaClasses
constructor TCodeForStatement.Create(const AVarName: string; AInitialExpression: TCodeExpression; AFinalExpression: TCodeExpression; AStatements: TArray<TCodeStatement>; ADescending: Boolean = False; ADeclareVar: Boolean = False);
Parameters
| <-> | Parameter | Type | Description |
|---|---|---|---|
| const | AVarName | string | The loop variable name. |
| AInitialExpression | TCodeExpression | The initial value expression. | |
| AFinalExpression | TCodeExpression | The final value expression. | |
| AStatements | TArray<TCodeStatement> | The statements in the loop body. | |
| ADescending | Boolean | Optional: Default value is False If True, generates a downto loop. |
|
| ADeclareVar | Boolean | Optional: Default value is False If True, declares the loop variable inline. |