Pascal/Turbo Pascal - Codigo de diseño de menu

 
Vista:
sin imagen de perfil

Codigo de diseño de menu

Publicado por Ivan (2 intervenciones) el 05/10/2016 20:28:20
Alguien tiene algun codigo de diseño de un menu, con encuadro alrededor del menu o algo asi.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

Codigo de diseño de menu

Publicado por ramon (5 intervenciones) el 05/10/2016 22:31:47
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
{Esto te valdría}
 
 program unmenu;
   uses
      crt;
 
   const
      archivo : string = 'Temporal.dat';
  type
     registro = record
           nombre : string[80];
           Apellidos : string;
           telefono  : longint;
           direccion : string;
        end;
  var
    tecla : char;
    reg : array[1..20] of registro;
    h, cont : integer;
    f : file of registro;
 
 
  procedure entrada_datos(c : integer);
  begin
     writeln;
     writeln('    entrada_datos [ Pulse Una Tecla ]');
     readkey;
  end;
 
  procedure guardar_registros(r : registro);
  begin
     writeln;
     writeln('   guardar_registros  [ Pulse Una Tecla ]');
     readkey;
  end;
 
  procedure carga_registros;
  begin
      writeln;
      writeln('   carga_registros  [ Pulse Una Tecla ]');
      readkey;
  end;
 
  procedure presenta_registros;
  begin
     writeln;
     writeln('   presenta_registros [ Pulse Una Tecla ]');
     readkey;
  end;
 
  procedure anula_registro;
  begin
     writeln;
     writeln('   anula_registro  [ Pulse Una Tecla ]');
     readkey;
  end;
 
   procedure presentar_un_registro;
   begin
     writeln;
     writeln('   presentar_un_registro  [ Pulse Una Tecla ]');
     readkey;
   end;
 
 
 
 
 procedure menu;
  var
    sal : boolean;
   begin
      sal := false;
      cont := 1;
    repeat
        clrscr;
        writeln('  ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿');
        writeln('  ³   **** Menu Jeneral ****     ³Û');
        writeln('  ³                              ³Û');
        writeln('  ³ E =  Entrada Registro        ³Û');
        writeln('  ³ G =  Guardar Registros       ³Û');
        writeln('  ³ C =  Cargar Registros        ³Û');
        writeln('  ³ P =  Presentar Registros     ³Û');
        writeln('  ³ A =  Anular Un Registro      ³Û');
        writeln('  ³ B =  Buscar Un Registro      ³Û');
        writeln('  ³ S =  Salir                   ³Û');
        writeln('  ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ');
        writeln('   ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÛ');
        writeln;
        writeln('      <<<< Elija Opcion >>>>');
        repeat
            tecla := upcase(readkey);
        until tecla in['E','G','C','P','A','B','S'];
        clrscr;
     case tecla of
  'E' : entrada_datos(cont);
  'G' : begin
         writeln('   Guardando Datos ');
         for h := 1 to cont - 1 do
         guardar_registros(reg[h]);
         delay(120);
         for h := 1 to 20 do
         fillchar(reg[h],sizeof(registro),0);
        end;
  'C' : carga_registros;
  'P' : presenta_registros;
  'A' : anula_registro;
  'B' : presentar_un_registro;
  'S' : sal := true;
    end;
    until sal = true;
   end;
 
   begin
      menu;
   end.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar