Lartu / ldpl

COBOL-like programming language that compiles to C++. With serious dinosaurs with neckties and briefcases 🦕💼
https://www.ldpl-lang.org/
Apache License 2.0
160 stars 24 forks source link

FOR EACH loops #120

Closed Lartu closed 5 years ago

Lartu commented 5 years ago

It would be wonderful to have FOR EACH loops in LDPL to iterate through every element in a MAP or a LIST. Maybe something like:

FOR EACH <var of the same type of the list> IN <list> DO

REPEAT
dgarroDC commented 5 years ago

I like this!

What about also using REPEAT instead of NEXT in FOR - FROM - TO - STEP - DO? I prefer if we use the same word in all loop statements.

Lartu commented 5 years ago

I'd love that! Better and simpler to understand.

dgarroDC commented 5 years ago

Done!

Lartu commented 5 years ago

Thank you very much!

dgarroDC commented 5 years ago

Wait, this issue isn't about that, haha.

Lartu commented 5 years ago

AHAHA sorry, yes, my bad.

Lartu commented 5 years ago

Thank you!

Lartu commented 5 years ago

@dgarroDC please don't forget to document this!

dgarroDC commented 5 years ago

Done!

Lartu commented 5 years ago

Thank youuuu! <3