Turbo Pascal . - . , .
:
, For … to … do For … downto …. do, . , , for- .
(While Repeat) . , .
– . – , . , . , , 1. . – , .
« » , , . ( ), . , .
For … to … do: ,
, , «», . , , , . .
2 : . :
for . := 1 to 2 do
begin
;
end;
: . ; 1 2 – ; , . , 1 , begin…end . , <.>, , 1.
for . := 1 downto 2 do
begin
;
end;
. , 1.
For … to … do :
For … downto … do , :
.
-
- ( ). .
.
- , For … to … do For … downto … do , 1.
Turbo Pascal:
, , . . . Break , , . . . .
( «» ) Continue. : , , .
Exit , . () , «» . Exit , .
Halt : .
« » , . , . « » . 3 , .
1
[0..199], . , 2.
:
- .
- :
a) 9 < < 100, 10 div;
b) mod;
c) ;
d) mod 2;
e) 0, 1.
2
. .
:
- , randomize.
- IF, : >0.
- , 1.
- .
, {}, . 11 : ( 5).
12 counter : 1, Inc.
3
. , .
:
. , . 1 .
:
- .
- , , «0».
- .
- : >0, 1.
- , .
: Turbo Pascal
, . , ++, Turbo Pascal, Delphi, Java . . 80- . ( ). ++ Java.
, : -60 , Pascal C, Java ++. , , . . 70- . « » , 80- – Turbo Pascal, 90- – ++. , «». , .
, . , C Pascal, .
Interestingly, the developers of Turbo Pascal (Old World) used the results of the work of American scientists, while in the New World they actively used the results of research by European experts. In Europe, developers advocate more for the purity and compactness of programming languages, and American minds are more inclined to use new-fangled trends in writing code.