:
Basic - Microsoft Visual Basic,
Pascal - Borland Delphi,
C++ - Borland C++Builder,
Java - Symantec Cafe.
1.
2.
3.
4.
5.
6.
7.
, Pascal, :
* ( );
* ;
* ( , , , );
* ( (), , , , , );
* , begin end.
:
program _ ;
program main;
uses , ;
uses crt, dos, graph;
label ;
label m1, m2, , mn;
const ;
const c1=_1; c2=_2;
type ;
type t1=__1; t2=__2;
var ;
var v1: _1; v2: _2;
begin
;
end.
.
' ', .
, . '.
, .
() , . .
' , .
, .
, , - , ( 1 0, ). ֳ . Turbo Pascal , , , .
ij | ||
ֳ | ||
Byte | 0..255 | 1 byte |
ShortInt | -128..127 | 1 byte |
SmallIn | -32768..32767 | 2 byte |
Integer, Longint | -2147483648..2147483647 | 4 byte |
Int64 | -263.. 263-1 | |
Word | 0..65535 | 2 byte |
Cardinal, LongWord | 0..4294967295 | |
ij | ||
Real | 2.9E-39..1.7E38 | 6 byte |
Single | 1.5E-45..3.4E38 | 4 byte |
Double | 5.0E-324..1.7E308 | 8 byte |
Extended | 3.4E-4932..1.1E4932 | 10 byte |
Comp 64-bit integer | 9.2E18..9.2E18 | 8 byte |
Char | ASCII | 1 byte |
String | 0..255 | Max-255 |
Boolean | True, False | 1 byte |
|
|
, .
:
+ ()
- ()
* ()
/ (),
:
Abs () - ,
Sqr () - x2,
Sqrt () - ,
Exp () - ,
Ln () - ,
Sin () - ,
Cos () - ,
Arctan () - ,
Odd () - ,
Int () - ,
Round () - ,
Trunc () - ,
Frac () -
, ( ).
, 2 + 3 + - 2 3.
(, ) , .
Pascal 10 :
1. ,
2. ,
3. ,
4. ,
5. ,
6. ,
7. ,
8. ,
9. ,
10. .
г
Ϊ | :=; | x:=0.785398; b:=c/a+1; n:=x; |
BEGIN END | ||
READ(); READLN(); | read(x1,x2,y); readln(X); | |
WRITE(); WRITELN(); | write(x); writeln(²Ғ); | |
if _ then ; | if c>0 x:=2*c; | |
if _ then _1 else _2; | if c>0 x:=2*c else x:=2+c; | |
case _ of __1: _1; __n: _n; else end; | case n of 1:writeln(); 2:writeln(); 7:writeln(); else writeln( ຒ) end; | |
for i:=k1 to k2 do ; | for i:=1 to 10 do s:=s+i; | |
while _ do; | while (k+1)/(k+2)<eps do begin n:=n+1; k:=k+1 end; | |
ϲ | repeat 1; 2; until _; | repeat wriekn(x); s:=s+x; until x=0; |
ϳ
|
|
, , , .
. .