Turbo Pascal , 1 2.
1. Turbo Pascal
SHORTINT | -128... 127 | 1 | |
BYTE | 0... 255 | 1 | |
INTEGER | -32768... 32767 | 2 | |
WORD | 0...65535 | 2 | |
LONGINT | -2 109... 2 109 | 4 |
2. Turbo Pascal
REAL | 10-38.. 1038 | 6 | ||
SINGLE | 10-32..1032 | 4 | ||
DOUBLE | 10-308..10308 | 8 | ||
EXTENDED | 10-4931..104931 | 10 | ||
COMP | - 9 1018.. 9 1018 | 8 |
Intel 8087/80287/80387 , , { $E+, N+}.
.
, .
real, single, double, extended, comp :
ü ;
ü For Case;
ü ;
ü .
BOOLEAN TRUE FALSE, .
CHAR ASCII, .
. (, , ) , . , . .
Turbo Pascal , , , , (), @, .
- . , , . .
3.
+ | - | - | |
- | - | - | |
* | - | - | |
/ | - | ||
div | |||
mod | |||
and | |||
or | |||
hor | |||
not | |||
+ | - | - | |
- | - | - |
, . . .
|
|
4.
= | = | True, | |
<> | <>B | True, | |
> | A>B | True, | |
< | A<B | True, | |
>= | A>=B | True, | |
<= | A<=B | True, | |
in | A in | True, |
() True False. boolean.
5. .
not | not A | True False | False True | ||
and | Ȕ | A and B | True True False False | True False True False | True False False False |
or | Ȕ | A or B | True True False False | True False True False | False True True True |
xor | Ȕ | A xor B | True True False False | True False True False | False True True False |
. 6.
6. .
@, not | () | |
*,/, div, mod, and | ||
+,-, or, xor | ||
=, <>,<,>,<=,>=, in | () |
Turbo Pascal , . , , , , , . , . .
Turbo Pascal :
Program < >;
Uses < >;
Label < >;
Const < >;
Type < >;
Var < >;
Function < >;
Procedure < >;
BEGIN 1; { };
2; { }
3;
.........
n;
END.
, , .
Program () , 63 . . .
|
|
, :