Olá Galera... Sem enrrola muito vo direto ao assunto... É o seguinte, eu faço analise de sistemas e estou no segundo periodo... O professor pediu para agente fazer 2 trabalhos (um com registros e o outro com registros e função)... O trabalho era em dupla e eu fiz minha parte (fiz o trabalho de registro esse ai em baixo) o #$%$# do meu "parceiro" n fez a parte dele que era para fazer o trabalho (esse ai de baixo) so que com registro e função... Estou desesperado porque não sei como fazer o trabalho com registro e função, queria saber se alguém poderia me ajudar =/ _________________________________________________________________________________________________ program secretaria; const totalunos = 3; type tdata = record dia, mes, ano: integer; end; tendereco = record rua: string[30]; numero: integer; bairro: string[20]; cidade: string[20]; estado: string[2]; end; taluno = record nome: string[30]; matricula: string[9]; sexo: char; curso: string[20]; endereco: tendereco; data: tdata; end; talunos = array [1..totalunos] of taluno; var alunos: talunos; data: tdata; endereco: tendereco; i, opcao, i1,i2: integer; s: char; c, b:string; begin for i := 1 to totalunos do begin writeln ('DADOS DO ALUNO.'); writeln ('Entre com o nome:'); readln (alunos.nome); writeln ('Entre com a matricula:'); readln (alunos.matricula); writeln ('Entre com o sexo:'); readln (alunos.sexo); writeln ('Entre com o curso:'); readln (alunos.curso); writeln ('DATA DE NASCIMENTO.'); writeln ('Entre com o dia:'); readln (alunos.data.dia); writeln('Entre com o mês:'); readln (alunos.data.mes); writeln ('Entre com o ano:'); readln (alunos.data.ano); writeln('ENDERECO'); writeln ('Entre com a rua:'); readln (alunos.endereco.rua); writeln ('Entre com o numero:'); readln (alunos.endereco.numero); writeln ('Entre com o bairro:'); readln (alunos.endereco.bairro); writeln('Entre com a cidade:'); readln (alunos.endereco.cidade); writeln ('Entre com o estado:'); readln (alunos.endereco.estado); end; repeat begin writeln ('Menu:'); writeln ('[1] - Listar todos os alunos.'); writeln ('[2] - Listar alunos por sexo.'); writeln ('[3] - Listar alunos por curso.'); writeln ('[4] - Listar alunos por sexo e curso.'); writeln ('[5] - Listar alunos por cidade.'); writeln ('[6] - Listar alunos por faixa de idade.'); writeln ('[7] - Listar alunos por bairro e faixa de idade.'); writeln ('[8] - Sair do Menu.'); readln (opcao); end; case opcao of 1: begin for i := 1 to totalunos do begin writeln (alunos.nome); writeln (alunos.matricula); writeln (alunos.curso); end; end; 2: begin writeln ('Digite o sexo desejado (m) ou (f):'); readln (s); if (s = 'm') then begin for i := 1 to totalunos do begin if (alunos.sexo = 'm') then begin writeln (alunos.nome); writeln (alunos.matricula); writeln (alunos.curso); end; end; end else if (s = 'f') then begin for i := 1 to totalunos do begin if (alunos.sexo = 'f') then begin writeln (alunos.nome); writeln (alunos.matricula); writeln (alunos.curso); end; end; end; end; 3: begin writeln ('Entre com o curso desejado:'); readln ( c ); for i := 1 to totalunos do begin if (c = alunos.curso) then begin writeln (alunos.nome); writeln (alunos.matricula); end; end; end; 4: begin writeln ('Digite o sexo desejado (m) ou (f):'); readln (s); writeln ('Digite o curso desejado:'); readln ( c ); if (s = 'm') then begin for i := 1 to totalunos do begin if ((alunos.sexo = 'm') and (c = alunos.curso)) then begin writeln (alunos.nome); writeln (alunos.matricula); end; end; end else if (s = 'f') then begin for i := 1 to totalunos do begin if ((alunos.sexo = 'f') and (c = alunos.curso)) then begin writeln (alunos.nome); writeln (alunos.matricula); end; end; end; end; 5: begin writeln ('Entre com a cidade desejada:'); readln ( c ); for i := 1 to totalunos do begin if (c = alunos.endereco.cidade) then begin writeln (alunos.nome); writeln (alunos.matricula); writeln (alunos.curso); end; end; end; 6: begin writeln ('Entre com a primeira idade:'); readln (i1); writeln ('Entre com a segunda idade (maior que a primeira):'); readln (i2); for i := 1 to totalunos do begin if ((2009 - alunos.data.ano >= i1) and (2009 - alunos.data.ano <= i2)) then begin writeln (alunos.nome); writeln (alunos.matricula); end; end; end; 7: begin writeln ('Entre com o bairro desejado:'); readln (B); writeln ('Entre com a primeira idade:'); readln (i1); writeln ('Entre com a segunda idade (maior que a primeira):'); readln (i2); for i := 1 to totalunos do begin if (b = alunos.endereco.bairro) and ((2009 - alunos.data.ano >= i1) and (2009 - alunos.data.ano <= 12)) then begin writeln (alunos.nome); writeln (alunos.matricula); writeln (alunos.curso); end; end; end; 8: writeln (‘Fechando o Menu.’); end; until (opcao = 8); end. __________________________________________________________________________________________________________________________ Esse é o programa e eu não sei como que faço ele com Registro e Função Junto... Pior de tudo q o trabalho é para amanha... Por favor que puder me ajuda agradeço muiiiiito... abraços...