| Summary: | For-loop i variable index not working | ||
|---|---|---|---|
| Product: | [Modeling] Acceleo | Reporter: | brandon8863 |
| Component: | Core | Assignee: | Project Inbox <acceleo-inbox> |
| Status: | CLOSED INVALID | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 3.0.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
Resolution: Within the same .mtl file there was 2 different templates defined. In the template that was not in the one where I was attempting to use the i index variable was a for loop that had i as the local iterator variable. When I changed that variable to item instead of i the editor and generation started working correctly. Lessons Learned: Do not use 'i' as iterator variable name in any for loops. Closing our "resolved" and "verified" bugs. |
From the new and noteworthy page: Acceleo [for] blocks now declare an implicit āiā variable that can be used to retrieve the iteration count. For example, [for (Sequence{4, 5, 6})][i/], [/for] will generate 1, 2, 3. the [i/] variable gives an error in the editor and does not work during generation.