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

Compound conditions #137

Closed dgarroDC closed 5 years ago

dgarroDC commented 5 years ago

This PR allows more complex conditions in IFand WHILE statements, using AND, OR and parenthesis. So, valid conditions are:

Like C++, the usual precedence rules and short-circuit evaluation are applied.

Example:

...
if length is greater than 0 and ( names:0 is equal to "Alice" or names:0 is equal to "Bob" ) then
 ...
end if
Lartu commented 5 years ago

This is so wonderful! I love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it i love it

Lartu commented 5 years ago

Thank you very, very much for this! This was what the language was lacking the most!! Thank you thank you thank you!

Lartu commented 5 years ago

Could you please document this later?