Esta é uma pré-visualização de arquivo. Entre para ver o arquivo original
E:\Desktop\IFMG\4º PERIODO\Aula AEDS 1\AGENDA_AEDS_VICTOR\AGENDAVICTOR.pas segunda-feira, 9 de setembro de 2013 15:02 Program trabalhoagenda; uses crt; var nome,tel:string; resp:integer; arq:text; procedure create; Begin writeln('Pessione Alguma tecla para criar a agenda'); readkey; assign(arq,'M:\Agenda\sinextra\victor.txt'); rewrite(arq); close(arq); end; Procedure join (nome,tel:string); Begin assign(arq,'M:\Agenda\sinextra\victor.txt'); append(arq); Writeln('Entre com o Nome: '); readln(nome); writeln('Entre com o Telefone: '); readln(tel); reset(arq); write(arq,nome); Write(arq,tel); close(arq); end; Procedure show(nome,tel:string); Begin assign(arq,'M:\Agenda\sinextra\victor.txt'); reset(arq); read(arq,nome); read(arq,tel); Writeln('Nome e telefone: ',nome); writeln('Pessione Alguma tecla para sair da agenda'); readkey; end; Begin textbackground( LIGHTBLUE ); clrscr; textcolor(WHITE); writeln( '§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§'); writeln('§§ §§'); writeln('§§ -1- E:\Desktop\IFMG\4º PERIODO\Aula AEDS 1\AGENDA_AEDS_VICTOR\AGENDAVICTOR.pas segunda-feira, 9 de setembro de 2013 15:02 §§'); writeln('§§ Agenda AEDS I MG-SJE §§'); writeln('§§ §§'); writeln('§§ §§'); writeln( '§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§'); textcolor(white); writeln('-- PRESSIONE ENTER UTILIZAR A AGENDA --'); readkey; clrscr; repeat textbackground( LIGHTBLUE ); clrscr; textcolor(WHITE); writeln( '§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§'); writeln('§§ §§'); writeln('§§ §§'); writeln('§§ 1: CRIAR',' ','2:INSERIR',' ','3:EXIBIR',' ', '4:SAIR ', '§§'); writeln('§§ §§'); writeln('§§ DIGITE A OPÇÃO DESEJADA §§'); writeln( '§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§'); textcolor(white); readln(resp); case (resp) of 1:create; 2:join(nome,tel); 3:show(nome,tel); end; until(resp=4) ; end. -2-