.


:




:

































 

 

 

 


-




Borland Pascal 7.0 for Windows. .

(, )

3.5.


Borland Pascal 7.0 for Windows. .

. 1

 

. 2 Borland Pascal 7.0 for DOS

. 3 Borland Pascal 7.0 for Windows

:

- File (, );

- Edit ;

- Search ;

- Run , ;

- Compile , .. ;

- Tools ;

- Options ;

- Window ;

- Help .

Compile/Make ( F9)

Run/Run ( Ctrl+F9)

Help/Topic Search (Ctrl+F1).

(Breakpoint) Ctrl+F8.

F7

F8.

: Ctrl+F7 , .

Alt+F5.

Ctrl+F2.

(, )

()

and, array, asm, begin, case, const, constructor, destructor, div, do, downto, else, end, file, for, function, goto, if, implementation, in, inherited, inline, interface, interrupt, label, library, mod, nil, not, object, of, or, packed, procedure, program, record, repeat, set, shl, shr, string, then, to, type, unit, until, uses, var, while, with, xor .

Borland Pascal

Absolute, far, name, resident, assembler, forward, near, virtual, export, index, private, external, interrupt, public.

:

- (Const);

- (Var);

- ;

- ;

- , ;

- .

: Alfa, C, X_max, Y_min, Sin, Cos, _10_A.

1

: :
:= - x:= 0. 1; c:= Cos(x); d:= c;
= - Const n= 1; m= 200;
Type M = array [N.. M] of integer;
; - b:= 5; goto M1; begin end;
: - Var b, c, d: real; i, j, k: integer;
M1: c:=sin(x);
, - Uses CRT, DOS;
.. - , a: array [1.. 100] of real;
() - , . y:= b/(c+d); y:=Sin(x);
[] - , a[1]:=22;
{} - { }
' - :='!';S:='C';
# - ASCII c:=#33;
$ - i:=$FF;
@ - yx:=@x; { yx - "x"}
^ - Var yx: ^real;, yx^:= 0. 1;
+ - / *-  
= <> > < <= >= -  

:


:

-

-

-

-

- -


TYPE A = array [ 1.. 1000 ] of real;

VAR a1, a2: A; { 1000 "A"}

VAR a1, a2: array [ 1.. 1000 ] of real;

, -
Single   7..8 10 (-45..+38)
Real   11..12 10 (-39..+38)
Double   15..16 10 (-324..+308)
Extended   19..20 10 (-4951..+4932)
Comp   19..20 -263 +1..+263 -1

 

VAR c, d, e: real;

d1, d2: double;

 

:

:= -125. 6; e:= 10;

d:= 1. e02; {} d:= 100.;

d1:= 1.2e-257; { 1.2*10-257}


 

:

Byte   0... 255
ShortInt   -128... 127
Word   0... 65535
Integer   -32768... 32767
LongInt   -2147483648... 2147483647

 

:

VAR i, j, k: byte;

h, m, n: integer;

l1, l2, l3: longint;

:

i:= 222; j:= 10; m:= -23000;

l1:= 280000;

h:= $A7; ( 10*16+7)


 

:

1. "+" - ;

2. " * " - ;

3. " - " ;

4. div - ;

5. mod - .

 

: VAR , ch, e: char;

 

:  
c:= '!'; c:= #33; { "!" }
ch:= #13; { Enter}
e:= #27; { Esc}
:  
Write(); { "! "}
Write(ch); { }
Write(); { , #27}

 

:

VAR s: string[25]; { s 1 25 }
s1: string; { s1 , 255}

: s:= ''; s1:= 'Hello';

 

:

VAR M1: array[1..200] of integer; A1: array[100..200] of real;   {1, A1 - }
ch1: array['A'..'Z'] of char; ch2: array[0..255] of char; {h1, ch2 - }

:

M1[1]:=5; M1[2]:=8; M1[3]:= M1[1]; M1[100]:=32;

A1[101]:=0.2; A1[102]:=2.31; ch1['B']:='C'; ch2[1]:='!'

-

:

TYPE Date_M=1..31;Rush_b='..';Lat_b= 'A..Z'; { }
Otmetka= (2,3,4,5); Ball= (1,2,3,4,5,6,7,8,9,10); { }

VAR t1,t2:Date_M; c1:Ruch_b; s1:Lat_b; a1,a2:Otmetka; b:Ball;

: t1:= 10; c1:= ''; s1:= 'F'; a1:=5; b:= 8;

:

VAR f1, f2: text;

:

Assign(f1, 'file1. in');

Assign(f2, 'C:\ PASCAL\ WORK\ file2. out');

:

Type Sity = Record  
Name_G: String[20]; Numb_G: LongInt; Stol_G: Boolean; Shir, Dol: Real End; { } { } { (, ) } { : , }
Var St1, St2, St3: Sity; { }
:  
St1. Name_G:= ''; St1. Numb_G:=1200000; { St1 }
St2. Name_G:= ''; St2. Numb_G:=8200000; St3:= St1;     { St3 }

Program NAME; { - } { NAME - }
  { }
{$N+} { }
Uses CRT, DOS, GRAPH; { CRT, DOS, GRAPH }
Label L1, L2, L3; { L1, L2, L3 }
Const C=10; { , }
B=0. 15; Y=True; {- , - }
F=''; { Y- , F- }
Type M= array[1.. 100] of integer; { }
Var { }
m1, m2: M; { m1, m2 - ( ) }
a1: array [ 1.. 100 ] of real; { 1 - }
ch: array [ 1.. 200 ] of char; { ch - }
ch1, ch2: char; { ch1, ch2 - }
s: string[79]; { s - 79 }
a, d, x: real; { a, d, x - }
yes, no: boolean; { yes, no - }
f1, f2: text; { }
Procedure NAME_1(Parm1:Real; Var Parm2:Real); { } { NME_1 - , Parm1, Parm2 - }
  { }
BEGIN  
  { }
END;  
  { }
Function FUN_1(Parm3, Parm4: Real): Real; { } { FUN_1 - , Parm3, Parm4 - }
  { }
BEGIN  
  { }
END;  
{ $I File_1. pas } { File_1. pas }
   
BEGIN { }
  { }
END. { }





:


: 2016-11-12; !; : 370 |


:

:

, .
==> ...

1530 - | 1363 -


© 2015-2024 lektsii.org - -

: 0.027 .