Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement semantic of the For statement #10

Open
meevee98 opened this issue Dec 18, 2019 · 0 comments
Open

Implement semantic of the For statement #10

meevee98 opened this issue Dec 18, 2019 · 0 comments

Comments

@meevee98
Copy link
Owner

meevee98 commented Dec 18, 2019

For is one of the control flow statements that consists in the repetition of a block of instruction a given number of times.

This is the syntax of the for loop in the PNP language:

para <control-variable> de <initial-value> ate <final-value> passo <increment-value> repita
    <block of instructions>
fim

Following that syntax, the for-loop iteration can start and end at any value since the values have both the same type. The step of increment can be omitted with the default value of 1.

para <control-variable> de <initial-value> ate <final-value> repita
    <block of instructions>
fim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant