2
Friends, I am learning programming logic and this doubt came when I should use these commands and their differences.
2
Friends, I am learning programming logic and this doubt came when I should use these commands and their differences.
7
FOR - For a number of repeats already defined, or even when you need to count repetitions, and even when you want to read an array from the last to the first element.
AS LONG AS - When your code has the amount of indefinite repeats and depending on one or more conditions to stop the loop.
REPEAT - When the loop is required to run at least once. The code block inside the loop will run the first time without the condition being checked.
Browser other questions tagged loop portugol
You are not signed in. Login or sign up in order to post.
Could you give examples? Unless it is a specific language, these terms (or their correspondents in English) are sometimes used with slightly different meanings from language to language, making it difficult to respond out of context. If you don’t have examples, at least a reference to where you saw these terms.
– mgibsonbr
I am learning Portuguese programming logic.
– Gilmar Santos
Related: Difference between while and for
– rray