Documente Academic
Documente Profesional
Documente Cultură
REZOLVARE:
PROCEDURE NOU
r=1
do while r=1
clear
use cinema
s = reccount()+1
go bottom
insert blank
replace codfilm with s
@ 2,2 say 'Dati numele filmului...' get numefilm
@ 3,2 say 'Productie... 'get productie
@ 4,2 say 'Regia...' get regia
@ 5,2 say 'Anul...' get anul
@ 6,2 say 'Genul filmului... 'get gen
@ 7,2 say 'Scenaristul filmului... 'get scenariu
@ 8,2 say 'Premiile primite...' get premii
n=0
@ 9,2 say 'Cati actori au jucat?'get n
read
clear
use actori
for i=1 to n
go bottom
insert blank
replace codfilm with s
? 'Actorul',i
@ 3,2 say 'Numele...'get nume
@ 4,2 say 'Sexul (m/f)...'get sex
@ 5,2 say 'Data nasterii...' get datan
@ 6,2 say 'Nationalitatea...' get natio
read
clear
endfor
@ 10,4 say 'Continuam cu introducerea filmelor?...(D=1 / N=0)...' get r
read
clear
enddo
return
PROCEDURE CRONO
use cinema
sort to cine2 on gen, anul
use cine2
g=gen
do while not eof()
? 'Primul film al genului ',g,' a fost ',numefilm
do while g=gen
skip
enddo
g=gen
enddo
use
return
PROCEDURE TARI
use cinema
sort to cine1 on productie
use cine1
? 'Tarile sunt urmatoarele:'
p=productie
do while not eof()
? ' ',p
do while p=productie
skip
enddo
p=productie
enddo
return
PROCEDURE ITALY
use cinema
? ' Filmele produse in Iatlia in anul 1994 sunt:...'
for i=1 to reccount()
go i
if (productie = 'ITALIA') .and. (anul=1994)
?' ', numefilm
endif
endfor
return
PROCEDURE GENURI
use cinema
sort to cine3 on gen, numefilm
use cine3
ge=gen
do while not eof()
? ' Genul ',ge
do while ge=gen
?' ', numefilm
skip
enddo
WAIT
ge=gen
enddo
return
PROCEDURE REGROM
use cinema
? ' Regizorii filmelor produse in Romania dupa 1989 sunt:...'
for i=1 to reccount()
go i
if (productie = 'ROMANIA') .and. (anul>1989)
? ' ',regia
endif
endfor
return
PROCEDURE FILMALES
nf=' '
@ 2,2 say 'Numele filmului dorit...' get nf
READ
@ 4,2 SAY 'Premiile filmului cerut sunt urmatoarele:'
use cinema
for i=1 to reccount()
go i
if numefilm = nf
?' ',premii
endif
endfor
return
PROCEDURE LISTASCENARISTI
use cinema
sort to cine4 on gen, scenariu
use cine4
ge=gen
do while not eof()
? ' Genul ',ge
do while ge=gen
?' ', scenariu
skip
enddo
WAIT
ge=gen
enddo
return
PROCEDURE TOM
use actori
for i=1 to reccount()
go i
if nume = 'TOM CRUISE'
? ' TOM CRUISE are varsta de... ',year( date() ) - year(datan), '
de ani.'
endif
endfor
return
PROCEDURE PEARIPI
use cinema
for i=1 to reccount()
go i
if numefilm = 'PE ARIPILE VANTULUI'
cod=codfilm
endif
endfor
use actori
? ' In filmul PE ARPILE VANTULUI au jucat urmatorii actori: '
for i=1 to reccount()
go i
if codfilm=cod
?' ',nume
endif
endfor
return
PROCEDURE ACTRITE
use actori
sort to act1 on natio
use act1
? ' Lista actritelor care n-au 30 de ani pe nationalitati: '
for i=1 to reccount()
go i
if (year(datan)>1971) .and. (sex= 'F')
?' ',nume, ' in varsta de ',year(date())-year(datan),' ani.'
endif
endfor
return
PROCEDURE VETERANI
use actori
sort to acti on datan/D, nume for natio = 'ROMANA'
use acti
? ' Actorii veterani romani sunt: '
if reccount()>5
for i=1 to 5
go i
? nume
endfor
else
list nume
endif
return