:
Program < >;
< >
Begin
< >
End.
Program, Begin End . .
, . . . , , , , .
.
, , , . , . :
1. (Label).
2. (Type).
3. (Const).
4. (Var).
5. (Procedure, Function).
- , .
.
, .
, :
Program PRIM;
( ), , , , , .
USES () TURBO PASCAL, . . :
uses CRT, Graph;
. , , . . , , , :
label 3, 471, 29, Quit;
, :
const K= 1024; MAX= 16384;
-
|
|
, :
var P,Q,R: Integer;
A,B: Char;
F1,F2: Boolean;
, . , , - .
,
begin.......end
. ;.
.
- , - , { }.
- , . . $ - + ( ) - ( ). :
{$E+} - ;
{$F+} - ;
{$N+} - ;
{$R+} - .
, :
{$I } - -
.
:
Program TRIANG;
var A, B, C, S, P: Real;
begin
Read(A,B,C);
WriteLn(A,B,C);
P:=(A+B+C)/2;
S:=Sqrt(P*(P-A)*(P-B)*(P-C));
WriteLn('S=',S:8:3)
end.
.
, , , , (), .
, (, , , , ..). " ". , . , . . .
, - , , : (), , ( ) . , .
, , , ( - ). , , () . " ". , . , . , , . , .
|
|
, :
1) ;
2) ;
3) .
, . -, . . , "progRaM" "PROGram" . -, . "" "K" ? : ( ) - , - . , - , , , , .
, . .
, , , , , , . , , , .
( "V"). , , . .
. , ( ), Record;
, ;
.. ;
: , Writeln;
; , ;
' ;
- + * / () ( );
< > ;
= , , ();
@ , ;
^ ;
{} ;
[ ] ;
_ , , - ;
# ;
$ , .
.
-, --
.
:
1) 26 26 :
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
a b c d e f g h i j k l m n o p q r s t u v w x y z
2) _
3) 10 :
0 1 2 3 4 5 6 7 8 9
4) :
+ - * / = <> < > <= >=:= @
5) :
., ' () [ ] (..) { } (* *)..:;
|
|
6) :
^ # $
7) ()
:ABSOLUTE EXPORTS LIBRARY SET
ASSEMBLER EXTERNAL MOD SHL
AND FAR NAME SHR
ARRAY FILE NIL STRING
ASM FOR NEAR THEN
ASSEMBLER FORWARD NOT TO
BEGIN FUNCTION OBJECT
CASE GOTO OF UNIT
CONST IF OR UNTIL
CONSTRUCTOR IMPLEMENTATION PACKED USES
DESTRUCTOR DESTRUCTOR PRIVATE VAR
DIV INDEX PROCEDURE VIRTUAL
DO INHERITED PROGRAM WHILE
DOWNTO INLINE PUBLIC WITH
ELSE INTERFACE RECORD XOR
END INTERRUPT REPEAT EXPORT
EXPORT LABEL RESIDENT
, . .
, , ? , . , , . , , .
, .
() - , , , , , , , . - , . _ . , 63 .
, , , , .
. , . .
:
A b12 r1m SIGMA gamma I80_86
. . . , :
217 -45 8954 +483
,
:
28.6 0.65 -0.018 4.0 512 -1.729 73.1-16
:
$7F $40 $ABC0
- , . , . :
'' 'STRING' '' ''''
.
, , , , . , : , ;
( );
, ("_");
.
|
|
.
, - .
, (, 7493, '', 54.899). , , , , , . ( ) . , .
: 2. 4 5 6 7 - 0 6
^ ^
"" ( ) ( ). , .
, , .
, - , . , , . Const. : <>=<>;
:
Const
Pi=3.14;
Name1='';
Name2='';
R21=6.33187E+03;
W_W_W=934122;
. .
.
. , , , .
. , , .
: , . :
- , , , ;
- , , , ;
- .
, . :
- , , , , ;
- ; - , , .
, . .
c , .
, , , . , , - .
: , , .
, TURBO PASCAL - .
, :
- ;
- Ord, ;
-
Pred Succ, ;
- Low High,
.
. 1 2 (), :
|
|
-1 2 ;
- 2 1
. :
type
T1 = Integer;
T2 = T1;
T3 = T2;
. , , :
- ;
- , ;
- - , - ;
- ;
- , - .
.
.
_( ).
,
Integer('Z')
'Z' ,
Byte(534)
22, 534 Word , Byte ,
.
, , , . , , . - . ( ) . , , , . .
, , . , . , , . , . "" (TYPE). , , . () , , , , .
: - Integer
"" - Longint
() ( - ) - Real
0 255 - Byte
0 65535 - Word
- Char
- String
- Boolean
(), . . , Char Byte . , - (ASC) .
, . .
Var, : < >:< >;
( ), . , , , . , , .
:
Var
A,B,H_22,Angle: Real;
Name3: String;
Flag: Boolean;
I,J,K,Count: Word;
.
:{}
.
- . PASCAL, C WINDOWS.
:
- , ;
- , , , . , , , _ ().
PASCAL :
---------------------
by Byte
sh Shortint
i Integer
w Word
l Longint
r Real
si Single
d Double
e Extended
c Comp
ch Char
b Boolean
p Pointer
x,
:
a --Array
s --String
sz --Stringz
se --Set
re --Record
f ---File
t ---Text
:
rV, arVector[1..20], sName, iCount.
, . ( ) TURBO PASCAL .
: = ;
, :
const rWeight: Real = 0.4;