Ir ao conteúdo
  • Cadastre-se
TheMajor

Pascal Write Comendo o 0

Posts recomendados

Então, eu estou fazendo um programa em pascal onde você cadastra um funcionario a uma database, e a esse funcionario consegue vincular dependentes.

Quando você vai fazer um cadastro de dependente e digita a matricula do funcionario, aparece por exemplo:

 

15151(matricula do funcionário válida)

Essa matricula pertence á:

Nome:

Cpf:

 

 

Nessa parte do cpf, se o cpf cadastrardo for começado por 0, por exemplo 055, ele come o 0 e só imprimi 55.

 

Program Pzim ;
				type
						funcionario = record
							matricula:integer;
							nome:string[50];
							cpf:string;  // Sem ponto e sem traços.
							rg:integer;
							titulo:integer;
							cnh:String;
							cep:integer;
							endereco:string;
							bairro:string;
							cidade:string;
							pais:string;
							sexo:char;
							uf:string[2];
							estadocivil:string;
							email:string;
				   		telefone:integer;
				   		dataa:integer;
				   		datad:integer;
				   		status:string;
					end;
					    type
							dependente = record
								nome:string;
								matricula:integer;
								cpf:integer;
							end;
								
					//criar uma constante pra limitar ou liberar o preenchimento de cada campo limitado.  
						const maxli=2000;

var op,opc,mat:integer; 
    fu:funcionario;
    de:dependente;
    dep:array[1..maxli] of dependente;
	  func:array[1..maxli] of funcionario;

	Procedure tela;
		begin
			textbackground(white);
			clrscr;
				gotoxy(05,05);	textcolor(white);			textbackground(white);		write('                                     ' ); // Início do fundo branco
				gotoxy(05,06);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,07);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,08);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,09);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,10);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,11);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,12);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,13);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,14);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,15);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,16);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,17);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,18);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,19);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,20);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,21);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,22);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,23);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,24);	textcolor(white);			textbackground(white);		write('                                     ' ); // Final do fundo branco
			  gotoxy(05,05);		textbackground(cyan );		write(' ··································· ' ); //Início das bordas
				gotoxy(05,06);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,06);		textbackground(cyan );		write('· '                                    );
				gotoxy(05,07);		textbackground(cyan );		write(' ··································· ' );
				gotoxy(05,08);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,08);		textbackground(cyan );		write('· '                                    );		
				gotoxy(05,09);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,09);		textbackground(cyan );		write('· '                                    );		
				gotoxy(05,10);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,10);		textbackground(cyan );		write('· '                                    );		
				gotoxy(05,11);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,11);		textbackground(cyan );		write('· '                                    );	
				gotoxy(05,12);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,12);		textbackground(cyan );		write('· '                                    );		
				gotoxy(05,13);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,13);		textbackground(cyan );		write('· '                                    );		
				gotoxy(05,14);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,14);		textbackground(cyan ); 		write('· '                                    );		
				gotoxy(05,15);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,15);		textbackground(cyan ); 		write('· '                                    );
				gotoxy(05,16);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,16);		textbackground(cyan ); 		write('· '                                    );							
				gotoxy(05,17);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,17);		textbackground(cyan ); 		write('· '                                    );
				gotoxy(05,18);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,18);		textbackground(cyan ); 		write('· '                                    );
				gotoxy(05,19);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,19);		textbackground(cyan ); 		write('· '                                    );
				gotoxy(05,20);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,20);		textbackground(cyan ); 		write('· '                                    );
				gotoxy(05,21);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,21);		textbackground(cyan );		write('· '                                    );
				gotoxy(05,22);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,22);		textbackground(cyan );		write('· '                                    );					
				gotoxy(05,23);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,23);		textbackground(cyan );		write('· '                                    );					
				gotoxy(05,24);		textbackground(cyan );		write(' ··································· ' );//Final das bordas
				gotoxy(17,06);		textbackground(white);		textcolor(black);		write(' TELA INICIAL');// Título da tela
				gotoxy(17,09);		textbackground(white);		textcolor(cyan);			write('1 - ');		textcolor(black);		write('REGISTRAR');//Opções da tela
				gotoxy(17,11);		textbackground(white);		textcolor(cyan);			write('2 - ');		textcolor(black);		write('CONSULTAR');
				gotoxy(17,13);		textbackground(white);		textcolor(cyan);			write('3 - ');		textcolor(black);		write('ALTERAR'  );
				gotoxy(17,15);		textbackground(white);		textcolor(cyan);			write('4 - ');		textcolor(black);		write('ARQUIVO MORTO');
				gotoxy(17,17);		textbackground(white);		textcolor(cyan);			write('5 - ');		textcolor(black);		write('IMPRIMIR' );
				gotoxy(17,19);		textbackground(white);		textcolor(cyan);			write('6 - ');		textcolor(black);		write('SAIR'     );
				gotoxy(11,21);		textbackground(white);		textcolor(red);			write('DIGITE A OPÇÃO DESEJADA [ ]'          );//Interação com o usuário
				gotoxy(36,21);		textbackground(white);		textcolor(black);			read(op);			
		end; 

		
	Procedure registroTitular;
	var cad,mat,opr:integer;
	 
		begin		
				
					textbackground(white);
					clrscr;
						gotoxy(05,05);		textcolor(white);		textbackground(white);		write('                                     ' );// Início do fundo branco
						gotoxy(05,06);		textcolor(white);		textbackground(white);		write('                                     ' );
						gotoxy(05,07);		textcolor(white);		textbackground(white);		write('                                     ' );
						gotoxy(05,08);		textcolor(white);		textbackground(white);		write('                                     ' );
						gotoxy(05,09);		textcolor(white);		textbackground(white);		write('                                     ' );
						gotoxy(05,10);		textcolor(white);		textbackground(white);		write('                                     ' );
						gotoxy(05,11);		textcolor(white);		textbackground(white);		write('                                     ' );
						gotoxy(05,12);		textcolor(white);		textbackground(white);		write('                                     ' );
						gotoxy(05,13);		textcolor(white);		textbackground(white);		write('                                     ' );
						gotoxy(05,14);		textcolor(white);		textbackground(white);		write('                                     ' );
						gotoxy(05,15);		textcolor(white);		textbackground(white);		write('                                     ' );
						gotoxy(05,16);		textcolor(white);		textbackground(white);		write('                                     ' );
						gotoxy(05,17);		textcolor(white);		textbackground(white);		write('                                     ' );
						gotoxy(05,18);		textcolor(white);		textbackground(white);		write('                                     ' );
						gotoxy(05,19);		textcolor(white);		textbackground(white);		write('                                     ' );
						gotoxy(05,20);		textcolor(white);		textbackground(white);		write('                                     ' );
						gotoxy(05,21);		textcolor(white);		textbackground(white);		write('                                     ' );
						gotoxy(05,22);		textcolor(white);		textbackground(white);		write('                                     ' );
						gotoxy(05,23);		textcolor(white);		textbackground(white);		write('                                     ' );
						gotoxy(05,24);		textcolor(white);		textbackground(white);		write('                                     ' );// Final do fundo branco
					  gotoxy(05,05);		textbackground(cyan );		write(' ··································· ' );//Início das bordas
						gotoxy(05,06);		textbackground(cyan );		write(' ·'                                    );
					  gotoxy(40,06);		textbackground(cyan );		write('· '                                    );
						gotoxy(05,07);		textbackground(cyan );		write(' ··································· ' );
						gotoxy(05,08);		textbackground(cyan );		write(' ·'                                    );
					  gotoxy(40,08);		textbackground(cyan );		write('· '                                    );		
						gotoxy(05,09);		textbackground(cyan );		write(' ·'                                    );
					  gotoxy(40,09);		textbackground(cyan );		write('· '                                    );		
						gotoxy(05,10);		textbackground(cyan );		write(' ·'                                    );
					  gotoxy(40,10);		textbackground(cyan );		write('· '                                    );		
						gotoxy(05,11);		textbackground(cyan );		write(' ·'                                    );
					  gotoxy(40,11);		textbackground(cyan );		write('· '                                    );	
						gotoxy(05,12);		textbackground(cyan );		write(' ·'                                    );
					  gotoxy(40,12);		textbackground(cyan );		write('· '                                    );		
						gotoxy(05,13);		textbackground(cyan );		write(' ·'                                    );
					  gotoxy(40,13);		textbackground(cyan );		write('· '                                    );		
						gotoxy(05,14);		textbackground(cyan ); 		write(' ·'                                    );
					  gotoxy(40,14);		textbackground(cyan ); 		write('· '                                    );		
						gotoxy(05,15);		textbackground(cyan ); 		write(' ·'                                    );
					  gotoxy(40,15);		textbackground(cyan ); 		write('· '                                    );
						gotoxy(05,16);		textbackground(cyan ); 		write(' ·'                                    );
					  gotoxy(40,16);		textbackground(cyan ); 		write('· '                                    );							
						gotoxy(05,17);		textbackground(cyan ); 		write(' ·'                                    );
					  gotoxy(40,17);		textbackground(cyan ); 		write('· '                                    );
						gotoxy(05,18);		textbackground(cyan ); 		write(' ·'                                    );
					  gotoxy(40,18);		textbackground(cyan ); 		write('· '                                    );
						gotoxy(05,19);		textbackground(cyan ); 		write(' ·'                                    );
					  gotoxy(40,19);		textbackground(cyan ); 		write('· '                                    );
						gotoxy(05,20);		textbackground(cyan ); 		write(' ·'                                    );
					  gotoxy(40,20);		textbackground(cyan ); 		write('· '                                    );
						gotoxy(05,21);		textbackground(cyan );		write(' ·'                                    );
					  gotoxy(40,21);		textbackground(cyan );		write('· '                                    );
						gotoxy(05,22);		textbackground(cyan );		write(' ·'                                    );
					  gotoxy(40,22);		textbackground(cyan );		write('· '                                    );					
						gotoxy(05,23);		textbackground(cyan );		write(' ·'                                    );
					  gotoxy(40,23);		textbackground(cyan );		write('· '                                    );					
						gotoxy(05,24);		textbackground(cyan );		write(' ·'                                    );
						gotoxy(40,24);		textbackground(cyan );		write('· '                                    );
						gotoxy(05,25);		textbackground(cyan );		write(' ·'                                    );
						gotoxy(40,25);		textbackground(cyan );		write('· '                                    ); 
						gotoxy(05,26);		textbackground(cyan );		write(' ·'                                    );
						gotoxy(40,26);		textbackground(cyan );		write('· '                                    ); 
						gotoxy(05,27);		textbackground(cyan );		write(' ·'                                    );
						gotoxy(40,27);		textbackground(cyan );		write('· '                                    );
						gotoxy(05,28);		textbackground(cyan );		write(' ··································· ' );//Final das bordas
						gotoxy(08,06);		textbackground(white);		textcolor(black);			write('   1 - Novo  2- Sair  [ ]      ');// Título da tela
						gotoxy(08,08);		textbackground(white);		textcolor(black);			write('Matrícula: '        	       );//Opções da tela
						gotoxy(08,09);		textbackground(white);		textcolor(black);			write('Nome: _________________________');
						gotoxy(08,10);		textbackground(white);		textcolor(black);			write('CPF: __________________________');
						gotoxy(08,11);		textbackground(white);		textcolor(black);			write('RG: ___________________________');
						gotoxy(08,12);		textbackground(white);		textcolor(black);			write('Título: _______________________');
						gotoxy(08,13);		textbackground(white);		textcolor(black);			write('CNH: __________________________');
						gotoxy(08,14);		textbackground(white);		textcolor(black);			write('CEP: __________________________');
						gotoxy(08,15);		textbackground(white);		textcolor(black);			write('Endereço: _____________________');
						gotoxy(08,16);		textbackground(white);		textcolor(black);			write('Bairro: _______________________');
						gotoxy(08,17);		textbackground(white);		textcolor(black);			write('Cidade: _______________________');
						gotoxy(08,18);		textbackground(white);		textcolor(black);			write('País: _________________________');
						gotoxy(08,19);		textbackground(white);		textcolor(black);			write('Sexo: _________________________');
						gotoxy(08,20);		textbackground(white);		textcolor(black);			write('UF: ___________________________');
						gotoxy(08,21);		textbackground(white);		textcolor(black);			write('Estado Civil: _________________');
						gotoxy(08,22);		textbackground(white);		textcolor(black);			write('E-mail: _______________________');
						gotoxy(08,23);		textbackground(white);		textcolor(black);			write('Telefone: _____________________');
						gotoxy(08,24);		textbackground(white);		textcolor(black);			write('Data de admissão: _____________');
						gotoxy(10,25);		textbackground(white);		textcolor(red);				write('                          ');
						gotoxy(10,26);		textbackground(white);		textcolor(red);				write('                          ');	
	 end;
	 
procedure cadastrar;
	var o,op,opr:integer;
		begin
		repeat
			registroTitular;
			gotoxy(31,06);read(o);
			if o=1 then
				begin
					inc(mat);
					gotoxy(18,08);write(mat);
					fu.matricula:=mat;
								gotoxy(14,09);read(fu.nome); 
								gotoxy(14,10);read(fu.cpf);
								gotoxy(12,11);read(fu.rg);								
								gotoxy(16,12);read(fu.titulo);
								gotoxy(13,13);read(fu.cnh);
								gotoxy(13,14);read(fu.cep);
								gotoxy(18,15);read(fu.endereco);
								gotoxy(16,16);read(fu.bairro);
								gotoxy(16,17);read(fu.cidade);
								gotoxy(14,18);read(fu.pais);
								gotoxy(14,19);read(fu.sexo);
								gotoxy(12,20);read(fu.uf);
								gotoxy(22,21);read(fu.estadocivil);
								gotoxy(16,22);read(fu.email);
								gotoxy(18,23);read(fu.telefone);
								gotoxy(25,24);read(fu.dataa);
					gotoxy(08,06);		textbackground(white);		textcolor(black);			write('                               ');
					gotoxy(10,25);		textbackground(white);		textcolor(red);				write('1 - Salvar   2 - Cancelar');
					gotoxy(10,26);		textbackground(white);		textcolor(red);				write('Digite a opção desejada [ ]');
					gotoxy(35,26);read(opr);
					if opr=1 then
						begin
							func[mat].status:='ATIVO';
							func[mat]:=fu;
						end;
					if opr=2 then
						dec(mat);																
				end
			else
				begin	 				
					textcolor(red);
					gotoxy(27,32);write('Saindo...');
					delay(1000);
				end;
		until (o=2);
	end;
		
Procedure registroOpcao;
		begin
			textbackground(white);
			clrscr;
				gotoxy(05,05);	textcolor(white);			textbackground(white);		write('                                     ' ); // Início do fundo branco
				gotoxy(05,06);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,07);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,08);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,09);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,10);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,11);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,12);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,13);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,14);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,15);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,16);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,17);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,18);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,19);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,20);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,21);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,22);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,23);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,24);	textcolor(white);			textbackground(white);		write('                                     ' ); // Final do fundo branco
			  gotoxy(05,05);		textbackground(cyan );		write(' ··································· ' ); //Início das bordas
				gotoxy(05,06);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,06);		textbackground(cyan );		write('· '                                    );
				gotoxy(05,07);		textbackground(cyan );		write(' ··································· ' );
				gotoxy(05,08);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,08);		textbackground(cyan );		write('· '                                    );		
				gotoxy(05,09);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,09);		textbackground(cyan );		write('· '                                    );		
				gotoxy(05,10);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,10);		textbackground(cyan );		write('· '                                    );		
				gotoxy(05,11);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,11);		textbackground(cyan );		write('· '                                    );	
				gotoxy(05,12);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,12);		textbackground(cyan );		write('· '                                    );		
				gotoxy(05,13);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,13);		textbackground(cyan );		write('· '                                    );		
				gotoxy(05,14);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,14);		textbackground(cyan ); 		write('· '                                    );		
				gotoxy(05,15);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,15);		textbackground(cyan ); 		write('· '                                    );
				gotoxy(05,16);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,16);		textbackground(cyan ); 		write('· '                                    );							
				gotoxy(05,17);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,17);		textbackground(cyan ); 		write('· '                                    );
				gotoxy(05,18);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,18);		textbackground(cyan ); 		write('· '                                    );
				gotoxy(05,19);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,19);		textbackground(cyan ); 		write('· '                                    );
				gotoxy(05,20);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,20);		textbackground(cyan ); 		write('· '                                    );
				gotoxy(05,21);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,21);		textbackground(cyan );		write('· '                                    );
				gotoxy(05,22);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,22);		textbackground(cyan );		write('· '                                    );					
				gotoxy(05,23);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,23);		textbackground(cyan );		write('· '                                    );					
				gotoxy(05,24);		textbackground(cyan );		write(' ··································· ' );//Final das bordas
				gotoxy(17,06);		textbackground(white);		textcolor(black);		write('   REGISTRO');// Título da tela
				gotoxy(17,09);		textbackground(white);		textcolor(cyan);			write('1 - ');		textcolor(black);		write('TITULAR');//Opções da tela
				gotoxy(17,11);		textbackground(white);		textcolor(cyan);			write('2 - ');		textcolor(black);		write('DEPENDENTE');
				gotoxy(17,13);		textbackground(white);		textcolor(cyan);			write('3 - ');		textcolor(black);		write('SAIR'  );
				gotoxy(11,21);		textbackground(white);		textcolor(red);			write('DIGITE A OPÇÃO DESEJADA [ ]'          );//Interação com o usuário			
		end; 

	Procedure registroDependente;
			var x,y,r,op:integer;
					e:boolean;
		begin
			clrscr;
				textbackground(white);
				gotoxy(05,05);		textcolor(white);		textbackground(white);		write('                                     ' );// Início do fundo branco
				gotoxy(05,06);		textcolor(white);		textbackground(white);		write('                                     ' );
				gotoxy(05,07);		textcolor(white);		textbackground(white);		write('                                     ' );
				gotoxy(05,08);		textcolor(white);		textbackground(white);		write('                                     ' );
				gotoxy(05,09);		textcolor(white);		textbackground(white);		write('                                     ' );
				gotoxy(05,10);		textcolor(white);		textbackground(white);		write('                                     ' );
				gotoxy(05,11);		textcolor(white);		textbackground(white);		write('                                     ' );
				gotoxy(05,12);		textcolor(white);		textbackground(white);		write('                                     ' );
				gotoxy(05,13);		textcolor(white);		textbackground(white);		write('                                     ' );
				gotoxy(05,14);		textcolor(white);		textbackground(white);		write('                                     ' );
				gotoxy(05,15);		textcolor(white);		textbackground(white);		write('                                     ' );
				gotoxy(05,16);		textcolor(white);		textbackground(white);		write('                                     ' );
				gotoxy(05,17);		textcolor(white);		textbackground(white);		write('                                     ' );
				gotoxy(05,18);		textcolor(white);		textbackground(white);		write('                                     ' );
				gotoxy(05,19);		textcolor(white);		textbackground(white);		write('                                     ' );
				gotoxy(05,20);		textcolor(white);		textbackground(white);		write('                                     ' );
				gotoxy(05,21);		textcolor(white);		textbackground(white);		write('                                     ' );
				gotoxy(05,22);		textcolor(white);		textbackground(white);		write('                                     ' );
				gotoxy(05,23);		textcolor(white);		textbackground(white);		write('                                     ' );
				gotoxy(05,24);		textcolor(white);		textbackground(white);		write('                                     ' );// Final do fundo branco
			  gotoxy(05,05);		textbackground(cyan );		write(' ··································· ' );//Início das bordas
				gotoxy(05,06);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,06);		textbackground(cyan );		write('· '                                    );
				gotoxy(05,07);		textbackground(cyan );		write(' ··································· ' );
				gotoxy(05,08);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,08);		textbackground(cyan );		write('· '                                    );		
				gotoxy(05,09);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,09);		textbackground(cyan );		write('· '                                    );		
				gotoxy(05,10);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,10);		textbackground(cyan );		write('· '                                    );		
				gotoxy(05,11);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,11);		textbackground(cyan );		write('· '                                    );	
				gotoxy(05,12);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,12);		textbackground(cyan );		write('· '                                    );		
				gotoxy(05,13);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,13);		textbackground(cyan );		write('· '                                    );		
				gotoxy(05,14);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,14);		textbackground(cyan ); 		write('· '                                    );		
				gotoxy(05,15);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,15);		textbackground(cyan ); 		write('· '                                    );
				gotoxy(05,16);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,16);		textbackground(cyan ); 		write('· '                                    );							
				gotoxy(05,17);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,17);		textbackground(cyan ); 		write('· '                                    );
				gotoxy(05,18);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,18);		textbackground(cyan ); 		write('· '                                    );
				gotoxy(05,19);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,19);		textbackground(cyan ); 		write('· '                                    );
				gotoxy(05,20);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,20);		textbackground(cyan ); 		write('· '                                    );
				gotoxy(05,21);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,21);		textbackground(cyan );		write('· '                                    );
				gotoxy(05,22);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,22);		textbackground(cyan );		write('· '                                    );					
				gotoxy(05,23);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,23);		textbackground(cyan );		write('· '                                    );					
				gotoxy(05,24);		textbackground(cyan );		write(' ·'                                    );
				gotoxy(40,24);		textbackground(cyan );		write('· '                                    );
				gotoxy(05,25);		textbackground(cyan );		write(' ·'                                    );
				gotoxy(40,25);		textbackground(cyan );		write('· '                                    ); 
				gotoxy(05,26);		textbackground(cyan );		write(' ·'                                    );
				gotoxy(40,26);		textbackground(cyan );		write('· '                                    ); 
				gotoxy(05,27);		textbackground(cyan );		write(' ·'                                    );
				gotoxy(40,27);		textbackground(cyan );		write('· '                                    );
				gotoxy(05,28);		textbackground(cyan );		write(' ··································· ' );//Final das bordas
				gotoxy(17,06);		textbackground(white);		textcolor(black);			write('   REGISTRO'); 		// Título da tela
				gotoxy(08,09);    textbackground(white);		textcolor(black);     write(' 1 - Novo  2 - Sair  [ ] ');
				gotoxy(30,09);Read(r);
					case r of
								2:begin;
										clrscr;
										registroOpcao;
								end;	 
						1:begin
								gotoxy(08,10);		textbackground(white);		textcolor(black);			write('Matrícula:_____________________');//Opções da tela
								gotoxy(18,10); read(mat);
								if func[mat].matricula=mat then
									begin
											de.matricula:=mat;
											gotoxy(08,11);		textbackground(white);		textcolor(green);			write('Matricula Válida!');
											gotoxy(10,30);    textbackground(white);		textcolor(red);       write('Matricula em Nome de: ',func[mat].nome);
											gotoxy(10,31);    textbackground(white);		textcolor(red);       write('Matricula No Cpf: ', func[mat].cpf);
											gotoxy(08,12);		textbackground(white);		textcolor(black);			write('Nome: _________________________');
											gotoxy(14,12); Read (de.nome);
											gotoxy(08,13);		textbackground(white);		textcolor(black);			write('CPF: __________________________');
											gotoxy(13,13); Read	(de.cpf);
											gotoxy(10,25);		textbackground(white);		textcolor(red);				write('1 - Salvar   2 - Cancelar');
											gotoxy(10,26);		textbackground(white);		textcolor(red);				write('Digite a opção desejada [ ]');
											gotoxy(35,26); Read (op);
												case op of
												1:begin
														dep[mat]:=de;
														Clrscr;
														gotoxy(08,12);  Textbackground(white); 	textcolor(green);			write('Registro Salvo com Sucesso!!');
														tela;
												  end;
												2:begin
															Clrscr;
															gotoxy(08,12);  Textbackground(white); 	textcolor(green);			write('Operação Cancelada!!');
															tela;
													end;
												end;
											 end
									else
										begin
											gotoxy(08,11);		textbackground(white);		textcolor(red);			write('Matricula Inválida!');
											delay(1000);
											registroDependente;
										end;
									end;
								end;
							end;				
				     							



  Procedure alterarOpcao;
		begin
			textbackground(white);
			clrscr;
				gotoxy(05,05);	textcolor(white);			textbackground(white);		write('                                     ' ); // Início do fundo branco
				gotoxy(05,06);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,07);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,08);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,09);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,10);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,11);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,12);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,13);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,14);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,15);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,16);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,17);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,18);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,19);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,20);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,21);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,22);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,23);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,24);	textcolor(white);			textbackground(white);		write('                                     ' ); // Final do fundo branco
			  gotoxy(05,05);		textbackground(cyan );		write(' ··································· ' ); //Início das bordas
				gotoxy(05,06);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,06);		textbackground(cyan );		write('· '                                    );
				gotoxy(05,07);		textbackground(cyan );		write(' ··································· ' );
				gotoxy(05,08);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,08);		textbackground(cyan );		write('· '                                    );		
				gotoxy(05,09);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,09);		textbackground(cyan );		write('· '                                    );		
				gotoxy(05,10);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,10);		textbackground(cyan );		write('· '                                    );		
				gotoxy(05,11);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,11);		textbackground(cyan );		write('· '                                    );	
				gotoxy(05,12);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,12);		textbackground(cyan );		write('· '                                    );		
				gotoxy(05,13);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,13);		textbackground(cyan );		write('· '                                    );		
				gotoxy(05,14);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,14);		textbackground(cyan ); 		write('· '                                    );		
				gotoxy(05,15);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,15);		textbackground(cyan ); 		write('· '                                    );
				gotoxy(05,16);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,16);		textbackground(cyan ); 		write('· '                                    );							
				gotoxy(05,17);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,17);		textbackground(cyan ); 		write('· '                                    );
				gotoxy(05,18);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,18);		textbackground(cyan ); 		write('· '                                    );
				gotoxy(05,19);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,19);		textbackground(cyan ); 		write('· '                                    );
				gotoxy(05,20);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,20);		textbackground(cyan ); 		write('· '                                    );
				gotoxy(05,21);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,21);		textbackground(cyan );		write('· '                                    );
				gotoxy(05,22);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,22);		textbackground(cyan );		write('· '                                    );					
				gotoxy(05,23);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,23);		textbackground(cyan );		write('· '                                    );					
				gotoxy(05,24);		textbackground(cyan );		write(' ··································· ' );//Final das bordas
				gotoxy(17,06);		textbackground(white);		textcolor(black);		write('   ALTERAR');// Título da tela
				gotoxy(17,09);		textbackground(white);		textcolor(cyan);			write('1 - ');		textcolor(black);		write('TITULAR');//Opções da tela
				gotoxy(17,11);		textbackground(white);		textcolor(cyan);			write('2 - ');		textcolor(black);		write('DEPENDENTE');
				gotoxy(17,13);		textbackground(white);		textcolor(cyan);			write('3 - ');		textcolor(black);		write('SAIR'  );
				gotoxy(11,21);		textbackground(white);		textcolor(red);			write('DIGITE A OPÇÃO DESEJADA [ ]'          );//Interação com o usuário
				gotoxy(36,21);		textbackground(white);		textcolor(black);			read(op);			
		end;
		
		    Procedure alterarBusca;
		begin
			textbackground(white);
			clrscr;
				gotoxy(05,05);	textcolor(white);			textbackground(white);		write('                                     ' ); // Início do fundo branco
				gotoxy(05,06);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,07);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,08);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,09);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,10);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,11);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,12);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,13);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,14);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,15);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,16);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,17);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,18);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,19);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,20);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,21);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,22);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,23);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,24);	textcolor(white);			textbackground(white);		write('                                     ' ); // Final do fundo branco
			  gotoxy(05,05);		textbackground(cyan );		write(' ··································· ' ); //Início das bordas
				gotoxy(05,06);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,06);		textbackground(cyan );		write('· '                                    );
				gotoxy(05,07);		textbackground(cyan );		write(' ··································· ' );
				gotoxy(05,08);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,08);		textbackground(cyan );		write('· '                                    );		
				gotoxy(05,09);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,09);		textbackground(cyan );		write('· '                                    );		
				gotoxy(05,10);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,10);		textbackground(cyan );		write('· '                                    );		
				gotoxy(05,11);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,11);		textbackground(cyan );		write('· '                                    );	
				gotoxy(05,12);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,12);		textbackground(cyan );		write('· '                                    );		
				gotoxy(05,13);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,13);		textbackground(cyan );		write('· '                                    );		
				gotoxy(05,14);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,14);		textbackground(cyan ); 		write('· '                                    );		
				gotoxy(05,15);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,15);		textbackground(cyan ); 		write('· '                                    );
				gotoxy(05,16);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,16);		textbackground(cyan ); 		write('· '                                    );							
				gotoxy(05,17);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,17);		textbackground(cyan ); 		write('· '                                    );
				gotoxy(05,18);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,18);		textbackground(cyan ); 		write('· '                                    );
				gotoxy(05,19);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,19);		textbackground(cyan ); 		write('· '                                    );
				gotoxy(05,20);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,20);		textbackground(cyan ); 		write('· '                                    );
				gotoxy(05,21);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,21);		textbackground(cyan );		write('· '                                    );
				gotoxy(05,22);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,22);		textbackground(cyan );		write('· '                                    );					
				gotoxy(05,23);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,23);		textbackground(cyan );		write('· '                                    );					
				gotoxy(05,24);		textbackground(cyan );		write(' ··································· ' );//Final das bordas
				gotoxy(17,06);		textbackground(white);		textcolor(black);		write('BUSCA ALTERAR');// Título da tela
				gotoxy(17,09);		textbackground(white);		textcolor(cyan);			write('1 - ');		textcolor(black);		write('MATRÍCULA');//Opções da tela
				gotoxy(17,11);		textbackground(white);		textcolor(cyan);			write('2 - ');		textcolor(black);		write('CPF');
				gotoxy(17,13);		textbackground(white);		textcolor(cyan);			write('3 - ');		textcolor(black);		write('SAIR'  );
				gotoxy(11,21);		textbackground(white);		textcolor(red);			write('DIGITE A OPÇÃO DESEJADA [ ]'          );//Interação com o usuário
				gotoxy(36,21);		textbackground(white);		textcolor(black);			read(op);			
		end;
	
	Procedure BuscaCPF;
		begin
			textbackground(white);
			clrscr;
				gotoxy(05,05);	textcolor(white);			textbackground(white);		write('                                     ' ); // Início do fundo branco
				gotoxy(05,06);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,07);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,08);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,09);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,10);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,11);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,12);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,13);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,14);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,15);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,16);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,17);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,18);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,19);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,20);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,21);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,22);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,23);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,24);	textcolor(white);			textbackground(white);		write('                                     ' ); // Final do fundo branco
			  gotoxy(05,05);		textbackground(cyan );		write(' ··································· ' ); //Início das bordas
				gotoxy(05,06);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,06);		textbackground(cyan );		write('· '                                    );
				gotoxy(05,07);		textbackground(cyan );		write(' ··································· ' );
				gotoxy(05,08);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,08);		textbackground(cyan );		write('· '                                    );		
				gotoxy(05,09);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,09);		textbackground(cyan );		write('· '                                    );		
				gotoxy(05,10);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,10);		textbackground(cyan );		write('· '                                    );		
				gotoxy(05,11);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,11);		textbackground(cyan );		write('· '                                    );	
				gotoxy(05,12);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,12);		textbackground(cyan );		write('· '                                    );		
				gotoxy(05,13);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,13);		textbackground(cyan );		write('· '                                    );		
				gotoxy(05,14);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,14);		textbackground(cyan ); 		write('· '                                    );		
				gotoxy(05,15);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,15);		textbackground(cyan ); 		write('· '                                    );
				gotoxy(05,16);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,16);		textbackground(cyan ); 		write('· '                                    );							
				gotoxy(05,17);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,17);		textbackground(cyan ); 		write('· '                                    );
				gotoxy(05,18);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,18);		textbackground(cyan ); 		write('· '                                    );
				gotoxy(05,19);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,19);		textbackground(cyan ); 		write('· '                                    );
				gotoxy(05,20);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,20);		textbackground(cyan ); 		write('· '                                    );
				gotoxy(05,21);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,21);		textbackground(cyan );		write('· '                                    );
				gotoxy(05,22);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,22);		textbackground(cyan );		write('· '                                    );					
				gotoxy(05,23);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,23);		textbackground(cyan );		write('· '                                    );					
				gotoxy(05,24);		textbackground(cyan );		write(' ··································· ' );//Final das bordas
				gotoxy(17,06);		textbackground(white);		textcolor(black);		write('BUSCA POR CPF');// Título da tela
				gotoxy(08,09);		textbackground(white);		textcolor(cyan);			write('CPF: ');		textcolor(black);		write('__________________________');//Opções da tela
				gotoxy(13,21);		textbackground(white);		textcolor(red);			write('DESEJA BUSCAR ?[S/N]: '          );//Interação com o usuário
				gotoxy(34,21);		textbackground(white);		textcolor(black);			read(op);	
	end;
	
	Procedure BuscaMatricula;
		begin
			textbackground(white);
			clrscr;
				gotoxy(05,05);	textcolor(white);			textbackground(white);		write('                                     ' ); // Início do fundo branco
				gotoxy(05,06);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,07);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,08);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,09);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,10);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,11);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,12);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,13);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,14);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,15);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,16);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,17);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,18);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,19);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,20);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,21);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,22);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,23);	textcolor(white);			textbackground(white);		write('                                     ' );
				gotoxy(05,24);	textcolor(white);			textbackground(white);		write('                                     ' ); // Final do fundo branco
			  gotoxy(05,05);		textbackground(cyan );		write(' ··································· ' ); //Início das bordas
				gotoxy(05,06);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,06);		textbackground(cyan );		write('· '                                    );
				gotoxy(05,07);		textbackground(cyan );		write(' ··································· ' );
				gotoxy(05,08);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,08);		textbackground(cyan );		write('· '                                    );		
				gotoxy(05,09);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,09);		textbackground(cyan );		write('· '                                    );		
				gotoxy(05,10);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,10);		textbackground(cyan );		write('· '                                    );		
				gotoxy(05,11);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,11);		textbackground(cyan );		write('· '                                    );	
				gotoxy(05,12);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,12);		textbackground(cyan );		write('· '                                    );		
				gotoxy(05,13);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,13);		textbackground(cyan );		write('· '                                    );		
				gotoxy(05,14);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,14);		textbackground(cyan ); 		write('· '                                    );		
				gotoxy(05,15);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,15);		textbackground(cyan ); 		write('· '                                    );
				gotoxy(05,16);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,16);		textbackground(cyan ); 		write('· '                                    );							
				gotoxy(05,17);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,17);		textbackground(cyan ); 		write('· '                                    );
				gotoxy(05,18);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,18);		textbackground(cyan ); 		write('· '                                    );
				gotoxy(05,19);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,19);		textbackground(cyan ); 		write('· '                                    );
				gotoxy(05,20);		textbackground(cyan ); 		write(' ·'                                    );
			  gotoxy(40,20);		textbackground(cyan ); 		write('· '                                    );
				gotoxy(05,21);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,21);		textbackground(cyan );		write('· '                                    );
				gotoxy(05,22);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,22);		textbackground(cyan );		write('· '                                    );					
				gotoxy(05,23);		textbackground(cyan );		write(' ·'                                    );
			  gotoxy(40,23);		textbackground(cyan );		write('· '                                    );					
				gotoxy(05,24);		textbackground(cyan );		write(' ··································· ' );//Final das bordas
				gotoxy(15,06);		textbackground(white);		textcolor(black);		write('BUSCA POR MATRICULA');// Título da tela
				gotoxy(08,09);		textbackground(white);		textcolor(cyan);			write('MATRÍCULA: ');		textcolor(black);		write('____________________');//Opções da tela
				gotoxy(13,21);		textbackground(white);		textcolor(red);			write('DESEJA BUSCAR ?[S/N]: '          );//Interação com o usuário
				gotoxy(34,21);		textbackground(white);		textcolor(black);			read(op);	
	end;
					 
Begin
 tela;
 repeat
    case op of
   		1:begin
   		clrscr;
   					registroOpcao;
   				gotoxy(36,21);		textbackground(white);		textcolor(black);			read(opc);;
					case opc of
					1:begin
						registroTitular;
						cadastrar;
					end;
					2: registroDependente;
					3:begin
							clrscr;
							tela;
						end;
					end;
				end;
	  end;
 until op=6;
		      clrscr;
					gotoxy(15,15);write('Sistema finalizado com sucesso!');
					delay(1000); 
   
End.

 

  • Amei 1

Compartilhar este post


Link para o post
Compartilhar em outros sites

@TheMajor   use uma string para o cpf ou qualquer outro valor que precise aparecer o zero antes , pois o integer não o faz .

Compartilhar este post


Link para o post
Compartilhar em outros sites

@TheMajor, uma observação:

 

Não precisa repetir o comando TextColor() e TextBackground(), ou seja, uma vez utilizado, as configurações ficam até que mude novamente.

 

Ex.:

procedure Tela;
  begin
  TextBackground(White);
  ClrScr;
  TextColor(White);
  GotoXY(05,05); write('                                     ' ); //Início do fundo branco
  GotoXY(05,06); write('                                     ' );
  GotoXY(05,07); write('                                     ' );
  GotoXY(05,08); write('                                     ' );
  GotoXY(05,09); write('                                     ' );
  GotoXY(05,10); write('                                     ' );
  GotoXY(05,11); write('                                     ' );
  GotoXY(05,12); write('                                     ' );
  GotoXY(05,13); write('                                     ' );
  GotoXY(05,14); write('                                     ' );
  GotoXY(05,15); write('                                     ' );
  GotoXY(05,16); write('                                     ' );
  GotoXY(05,17); write('                                     ' );
  GotoXY(05,18); write('                                     ' );
  GotoXY(05,19); write('                                     ' );
  GotoXY(05,20); write('                                     ' );
  GotoXY(05,21); write('                                     ' );
  GotoXY(05,22); write('                                     ' );
  GotoXY(05,23); write('                                     ' );
  GotoXY(05,24); write('                                     ' ); //Final do fundo branco
  TextBackground(Cyan);
  GotoXY(05,05); write(' ··································· ' ); //Início das bordas
  GotoXY(05,06); write(' ·'                                    );
  GotoXY(40,06); write('· '                                    );
  GotoXY(05,07); write(' ··································· ' );
  GotoXY(05,08); write(' ·'                                    );
  GotoXY(40,08); write('· '                                    ); 
  GotoXY(05,09); write(' ·'                                    );
  GotoXY(40,09); write('· '                                    ); 
  GotoXY(05,10); write(' ·'                                    );
  GotoXY(40,10); write('· '                                    ); 
  GotoXY(05,11); write(' ·'                                    );
  GotoXY(40,11); write('· '                                    );  
  GotoXY(05,12); write(' ·'                                    );
  GotoXY(40,12); write('· '                                    ); 
  GotoXY(05,13); write(' ·'                                    );
  GotoXY(40,13); write('· '                                    ); 
  GotoXY(05,14); write(' ·'                                    );
  GotoXY(40,14); write('· '                                    ); 
  GotoXY(05,15); write(' ·'                                    );
  GotoXY(40,15); write('· '                                    );
  GotoXY(05,16); write(' ·'                                    );
  GotoXY(40,16); write('· '                                    ); 
  GotoXY(05,17); write(' ·'                                    );
  GotoXY(40,17); write('· '                                    );
  GotoXY(05,18); write(' ·'                                    );
  GotoXY(40,18); write('· '                                    );
  GotoXY(05,19); write(' ·'                                    );
  GotoXY(40,19); write('· '                                    );
  GotoXY(05,20); write(' ·'                                    );
  GotoXY(40,20); write('· '                                    );
  GotoXY(05,21); write(' ·'                                    );
  GotoXY(40,21); write('· '                                    );
  GotoXY(05,22); write(' ·'                                    );
  GotoXY(40,22); write('· '                                    );
  GotoXY(05,23); write(' ·'                                    );
  GotoXY(40,23); write('· '                                    );
  GotoXY(05,24); write(' ··································· ' );//Final das bordas
  TextBackground(White); TextColor(Black);
  GotoXY(17,06); write(' TELA INICIAL');//Título da tela
  TextBackground(White);
  GotoXY(17,09); TextColor(Cyan);  write('1 - '); TextColor(Black); write('REGISTRAR    ');//Opções da tela
  GotoXY(17,11); TextColor(Cyan);  write('2 - '); TextColor(Black); write('CONSULTAR    ');
  GotoXY(17,13); TextColor(Cyan);  write('3 - '); TextColor(Black); write('ALTERAR      ');
  GotoXY(17,15); TextColor(Cyan);  write('4 - '); TextColor(Black); write('ARQUIVO MORTO');
  GotoXY(17,17); TextColor(Cyan);  write('5 - '); TextColor(Black); write('IMPRIMIR     ');
  GotoXY(17,19); TextColor(Cyan);  write('6 - '); TextColor(Black); write('SAIR         ');
  GotoXY(11,21); TextColor(Red);   write('DIGITE A OPÇÃO DESEJADA [ ]'          );//Interação com o usuário
  GotoXY(36,21); TextColor(Black); readln(op);
  end;

 

 

  • Curtir 1

Compartilhar este post


Link para o post
Compartilhar em outros sites

Crie uma conta ou entre para comentar

Você precisar ser um membro para fazer um comentário

Criar uma conta

Crie uma nova conta em nossa comunidade. É fácil!

Crie uma nova conta

Entrar

Já tem uma conta? Faça o login.

Entrar agora





Sobre o Clube do Hardware

No ar desde 1996, o Clube do Hardware é uma das maiores, mais antigas e mais respeitadas publicações sobre tecnologia do Brasil. Leia mais

Direitos autorais

Não permitimos a cópia ou reprodução do conteúdo do nosso site, fórum, newsletters e redes sociais, mesmo citando-se a fonte. Leia mais

×
×
  • Criar novo...

GRÁTIS: minicurso “Como ganhar dinheiro montando computadores”

Gabriel TorresGabriel Torres, fundador e editor executivo do Clube do Hardware, acaba de lançar um minicurso totalmente gratuito: "Como ganhar dinheiro montando computadores".

Você aprenderá sobre o quanto pode ganhar, como cobrar, como lidar com a concorrência, como se tornar um profissional altamente qualificado e muito mais!

Inscreva-se agora!