C04) How do I work around "Repetition of non simple patterns is not implemented" (using v5.0 of the compiler)?
Description
This article is from the FAQ, by with numerous contributions by
others.
C04) How do I work around "Repetition of non simple patterns is not implemented" (using v5.0 of the compiler)?
If you want to write:
persons: [100]@person
(which is not implemented in version 5.0 of the BETA compiler), you should
instead write:
persons: [100]^persons
and then, before you start using the persons repetition, initialize it by:
(for i: persons.range repeat
&person[]->persons[i][]
for)
Then you can use the persons repetition in the rest of the program, just as
if it was declared as a repetition of static persons.
In version 5.1 of the BETA compiler, persons: [100]@person is implemented.
 
Continue to: