- MESSAGEBOX(oControl.Name)
ENDFOR f = Factorial(10)
FUNCTION Factorial(n)
LOCAL i, r r = 1 FOR i = n TO 1 STEP -1 r = r * i NEXT && Can also use "
ENDFOR" here instead...
- to k−1 do rotate(i,k,i,l)
endfor for i := k+1 to l−1 do rotate(k,i,i,l)
endfor for i := l+1 to n do rotate(k,i,l,i)
endfor !
rotate eigenvectors for...
- fields. {% for user in
users %} {{ user.username }} {{ user.p****word }} {%
endfor %}
Although break and
continue are not
allowed inside loops,
sequences can...
- upto 4: p[i]t=p[i]
transformed pagecoords;
endfor for i=0 upto 5: z[i]t=z[i]
transformed pagecoords;
endfor % do some
drawing fill p4t
withcolor (1,1,0...
-
terminated with more
specific Control structure keywords, i.e., endif,
endfor, endwhile, etc.;
Functions can be
defined within scripts and at the Octave...
-
defined and i == 1%} ... {%
endif %}: condition. {% for i in 0..10 %} ... {%
endfor %}:
counter in a loop. The
apostrophe (') is the
escape character. To create...
- WriteLine("Multiplication Tables") For i = 1 To 10 TextWindow.Write(i * 4)
EndFor While loops are also supported, and the
demonstrated For loop can be augmented...
- a(i,k)/a(k,k);
endif endfor for j = (k+1):n for i = j:n if (a(i,j) != 0) a(i,j) = a(i,j) - a(i,k)*a(j,k);
endif endfor endfor endfor for i = 1:n for j =...
- y(i, j) = r1 * sin(u(i)) * r2 * cos(v(j)); z(i, j) = r2 * sin(v(j));
endfor;
endfor; mesh(x, y, z); endfunction; The
superformula can be
generalized by...
- to 255 S[i] := i
endfor j := 0 for i from 0 to 255 j := (j + S[i] + key[i mod keylength]) mod 256 swap
values of S[i] and S[j]
endfor For as many iterations...