This shows you the differences between two versions of the page.
pt:for [2016/01/01 22:47] |
pt:for [2020/02/28 10:46] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== For / Next ===== | ||
+ | ==== Formato ==== | ||
+ | **for** // | ||
+ | // | ||
+ | **next** // | ||
+ | ==== Descrição ==== | ||
+ | |||
+ | Esta estrutura faz com que uma variavel assuma os valores de // | ||
+ | |||
+ | ==== Exemplo ==== | ||
+ | |||
+ | < | ||
+ | for n = 0 to 10 step 2 | ||
+ | print n | ||
+ | next n | ||
+ | </ | ||
+ | Produz | ||
+ | < | ||
+ | 0 | ||
+ | 2 | ||
+ | 4 | ||
+ | 6 | ||
+ | 8 | ||
+ | 10 | ||
+ | </ | ||
+ | |||
+ | ==== Ver também ==== | ||
+ | [[dountil|Do / Until]], [[whileendwhile|While / End While]] |