meevee98 / PNP

PNP is not Pseudocode
MIT License
0 stars 0 forks source link

Implement semantic of the Do-While statement #9

Open meevee98 opened 4 years ago

meevee98 commented 4 years ago

Do-While is one of the control flow statements that consists in the repetition of a block of instruction while the given Boolean condition is false. The difference between it and the while statement is that while has a pre-condition and do-while has a pos-condition. That means that the do-while statement executes its block of instructions at least once.

This is the syntax of the do-while loop in the PNP language:

repita
    <block of instructions>
ate que <condition>;

The Java implementation that it's been refactored already have an implementation of the do-while statement. We have to refactor it to Kotlin too.