User Tools

Site Tools


pt:fornext

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

pt:fornext [2016/01/01 22:47] (current)
Line 1: Line 1:
 +===== For / Next =====
 +==== Formato ====
 +**for** //​variable//​ =  //​expression1//​ **to** //​expression2//​ [ **step** //​expression3//​ ] \\
 +//​statement(s)//​\\
 +**next** //​variable//​
 +
 +==== Descrição ====
 +
 +Esta estrutura faz com que uma variavel assuma os valores de  //​expression1//​ até //​expression2//​ por incrementos de //​expression3// ​
 +
 +==== Exemplo ====
 +
 +<​code>​
 +for n = 0 to 10 step 2
 +print n
 +next n
 +</​code>​
 +Produz
 +<​code>​
 +0
 +2
 +4
 +6
 +8
 +10
 +</​code>​
 +
 +==== Ver também ====
 +[[dountil|Do / Until]], [[whileendwhile|While / End While]]
  
pt/fornext.txt · Last modified: 2016/01/01 22:47 (external edit)