Лекции по информатике

Вопросы - Компьютеры, программирование

Другие вопросы по предмету Компьютеры, программирование

>)

(file,real, integer) : (i,i,i) (i,0,i)

RENAME () .

(string,string) : (i,i)

DELETE ()

(string) : (i)

DISK ()

(string) : (i) (0) , (1) , (0) . , ...

CLOSEFILE ()

(file) : (i)

 

3. .

1.

domains

file = ff

P2 = integer

Pole, Pole1 = string

predicates

vvod

put

clouses

put if

write (“ ”),

readint (Pr),

Pr=0

vvod

vvod if

write (“ ”),

readln (Pole), nl,

write (Pole),

concat (Pole, “ \n”, Pole1),

openappend (ff, “text”)

writedevice (ff),

write (pole1),

closefile (ff),

writedevice (screen),

write ( “”, Pole1, “ ”)

.. -, . . - , - . . , - tmc

tmc ( Post, Kod, Kol, Cena)

2.

domains

file = ff

data= tmc ( Post, Kod, Kol, Cena)

Post,Kod=string

Kol, Cena=integer

predicates

put

spr

clouses

put if

not (eof (ff)),

spr.

put if

eof(ff),nl,

write (“ ”),

closefile (ff)

spr if

readterm (data, tmc (Post, Kod, Kol, Cena), nl,

write (post), nl,

put.

goal

openread (ff, “text”),

readdevice (ff),

spr.

3.

domains

file=ff

Pr= integer

Pole, Pole1 = string

K = real

predicaes

put

mod

clouses

put if

write ( “ ”),

readint (P2),

p2 = 0,

mod.

mod if

write (“ ”), nl,

readreal (K), nl,

K1=K*12,

openmodify (ff, “text”),

readdevice (ff),

48

filepos (ff,K1,0)

readln (Pole),

write ( “ ”, pole), nl,

writedevice (ff),

filepos (ff,K1,0),

write (Pole1,”\n”),

closefile (ff),

writedevice (screen),

write ( “ ”, Pole1), nl,

readdevice (keybord),

put

goal

mod

 

: -

 

, . , .

. - :

1. . -, . domains, , . .

2. , . .. global predicates.

3.- - .

3.1. include “ ”.

include , .

.. , .. .