Saturday 22 October 2011

FOR

Hello all .... How are you ??? fine ???
Now we will study about FOR . In pascal , FOR use to make the repeat statement , like make a line of number that increase ...

 To the point , how to use FOR ??
we can use for like this :

FOR Variabel := (first_value) to (last_value) do begin
Statement 1 ;
statement 2 ;
statement 3 ;
end;

but it use only if (first_value) less than (last_value).
If (first_value) more than (last_value) , we can use this :

FOR variabel := (first_value) downto (last_value) do begin
statement 1 ;
statement 2 ;
statement 3 ;
end;

We can see this picture :


I think only that for now , we continue at the next post .. bye ...

No comments:

Post a Comment