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
161 stars 24 forks source link

Added `CONVERT _ TO UPPERCASE/LOWERCASE IN _` statements #213

Closed xvxx closed 1 year ago

xvxx commented 1 year ago

This is something else I uncovered while trying to convert compileman.php to LDPL: no uppercase/lowercase conversion in LDPL by default. I think it's handy to have these included in the language.

DATA:
    input is text
    output is text

PROCEDURE:
    store "ldpl updates? great!" in input
    convert input to uppercase in output
    display "input: " input crlf
    display "output: " output crlf
$ ./example-bin
input: ldpl updates? great!
output: LDPL UPDATES? GREAT!
Lartu commented 1 year ago

What, really? I can't believe we didn't have this! In the language that constantly boasts about utf-8 support and strings! Dinoshame!

Lartu commented 1 year ago

Thank you for the contribution!