Types of variables in Pascal: description, properties, examples

, «», , . , : , , . , , .

, , .

. . , , . , .

types of variables in pascal




. 5 , , , -.

5 , .





Byte ShortInt – 1 . , Byte , ShortInt ( -128 +127). Word Integer, , – 2 .

, LongInt , , 4 – 2 16- . , , , .

Pascal string variables




, , . , , : , -128 +127.

, (BOOLEAN), TRUE () FALSE () 1 .

CHAR , . , .





. Single, Real, Double Extended , .

, , 4, 6, 8 10 .

. , :

Type

String=array [1..100] of char;

Var Y=String;

, String, 100 . Y, String. , , , .

character variables in pascal




, , :

readln(Y[2]);

Y.

, – , . . char.

, . . , :

type NTel = Record

NAME: String[12];

NUMBER: String[10]

end;

var one: NTel;

, – record. , – . «end» , , , .

One, NTel.

, , : one.NAME (. . _.__).

, , , .

description of variables in pascal




, :

‘File1.DAT’

‘C:\Folder\File2.txt’

, , . .

:

var

f1: file of integer;

kinds of variables in pascal




, , , , , .

. , , , «» , .




All Articles