Pascal/Turbo Pascal - Ayuda con proyecto en pascal

 
Vista:
sin imagen de perfil

Ayuda con proyecto en pascal

Publicado por Duglas (1 intervención) el 04/11/2014 21:30:19
Al iniciar el programa el módulo debe desplegar el siguiente Menú:

1. Ingresar Datos de Cliente.

2. Ingresar Artículos.

3. Ingresar Pedido de Cliente.

4. Ingresar Solicitud de Retorno de Mercadería.

5. Salir

El siguientes es el comportamiento de cada una de las opciones – este comportamiento debe ser programado haciendo uso de procedimientos o funciones según sea necesario.

1. Debe presentar una pantalla con un formato agradable a la vista que permita agregar información del cliente; los siguientes son los datos que se solicitarán y que deberán ser almacenadas en variables globales para ser utilizadas a lo largo de la ejecución del programa.

1. Cédula del Cliente: Numérico.

2. Nombre del Cliente: Alfanumérico.

3. Teléfono del Cliente: Numérico

4. Móvil del Cliente: Numérico

5. Sexo del Cliente: Alfanumérico 6. Dirección del Cliente: Alfanumérico

7. Tiene Crédito: S o N.

8. Monto Crédito: Numérico con decimales.

Debe presentar una pantalla con un formato agradable a la vista que permita agregar información del tipo de cliente; los siguientes son los datos que se solicitarán y que deberán ser almacenadas en variables globales para ser utilizadas a lo largo de la ejecución del programa.

9. Código de Tipo de Cliente: Numérico.

10. Nombre de Tipo de Cliente: Alfanumérico.

2. Debe presentar una pantalla con un formato agradable a la vista que permita agregar información de artículos; los siguientes son los datos que se solicitarán y que deberán ser almacenadas en variables globales para ser utilizadas a lo largo de la ejecución del programa.

1. Código de Artículo: Numérico

2. Nombre de Artículo: Alfanumérico

3. Descripción del Artículo: Alfanumérico

4. Precio del Artículo: Numérico con decimales

3. Debe presentar una pantalla con un formato agradable a la vista que permita agregar información general (Encabezado) del pedido del cliente; los siguientes son los datos que se solicitarán y que deberán ser almacenadas en variables globales para ser utilizadas a lo largo de la ejecución del programa. 1. Código del Cliente: Numérico

2. Nombre del Cliente: Alfanumérico

3. Fecha (Fecha y hora actual del sistema, ver gethora.pas adjunto): Alfanumérico

4. Monto Total (Es la suma de los precios totales por línea incluidos en el detalle del pedido): Numérico con decimales

Debe presentar una pantalla con un formato agradable a la vista que permita agregar información detallada del pedido; el usuario llenará un máximo de 5 líneas de artículos vendidos, los siguientes son los datos que se solicitarán y que deberán ser almacenadas en variables globales para ser utilizadas a lo largo de la ejecución del programa.

5. Cantidad de Artículo, línea 1..5: Numérico

6. Código del Artículo, línea 1..5: Numérico

7. Nombre del Artículo, línea 1..5: Alfanumérico

8. Precio unitario del Artículo, línea 1..5: Numérico con decimales

9. Precio total de la línea (Cantidad * Precio unitario), línea 1..5: Numérico con decimales

4. La opción número cuatro, permitirá al usuario ingresar una solicitud de Retorno de Mercadería, la cual deberá presentar una pantalla con un formato agradable a la vista que permita agregar información, esta información deberá ser almacenada en variables globales para su posterior uso.

1. Código del Cliente: Numérico

2. Nombre del Cliente: Alfanumérico

3. Fecha de Compra del Artículo: Alfanumérico

4. Fecha y Hora de Retorno del Artículo (Fecha actual del sistema, ver gethora.pas adjunto): Alfanumérico

5. Código del Artículo: Numérico

6. Nombre del Artículo: Alfanumérico

7. Motivo de Retorno: Alfanumérico

Cada una de las opciones anteriormente descritas deben ser ejecutadas mediante el uso de procedimientos y funciones según sea el caso y la necesidad. Cada una de las ventanas debe brindar al usuario la opción de salir mediante el uso de alguna tecla, y esta opción retornará al menú principal, manteniendo los valores en las variables globales.
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

Ayuda con proyecto en pascal

Publicado por ramon (2158 intervenciones) el 09/11/2014 01:39:35
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
{Mira esto te lo pongo en punteros para poder manejar mas cantidad de datos espero esto te hayude }
 
program proyecto;
  uses
     crt, dos;
  type
    pregcli = ^registrocliente;
    registrocliente = record
           Cedula : longint;
           Nombre : string;
         Telefono : longint;
            Movil : longint;
             Sexo : string[8];
        Direccion : string;
          Credito : char;
    Monto_Credito : real;
    Cod_T_Cliente : longint;
 Nombre_T_Cliente : string;
              sig : pregcli;
          end;
 
    pproduc = ^regproducto;
    regproducto = record
          Codigo_Articulo : longint;
          Nombre_Articulo : string;
     Descripcion_Articulo : string;
          Precio_Articulo : real;
          sigp : pproduc;
         end;
 
     regisarticulo = record
         Cantidad_Articulo : integer;
           Codigo_Articulo : longint;
           Nombre_Articulo : string;
           Precio_unitario : real;
              Precio_total : real;
            end;
 
     pdidocli = ^pedidocliente;
     pedidocliente = record
            Codigo_Cliente : longint;
            Nombre_Cliente : string;
                     Fecha : string[10];
                      hora : string[5];
                     artic : array[1..5] of regisarticulo;
                     Total : real;
                       sge : pdidocli;
                   end;
 
     pretor = ^regretorno;
     regretorno = record
                  Codigo_Cliente : longint;
                  Nombre_Cliente : string;
           Fecha_Compra_Articulo : string[10];
                           Fecha : string[10];
                            Hora : string[5];
                 Codigo_Articulo : longint;
                 Nombre_Articulo : string;
                  Motivo_Retorno : string;
                             arg : pretor;
              end;
 
 
  var
    cliente : registrocliente;
    actu, ante, prim : pregcli;
    act, ant, pri : pproduc;
    produc : regproducto;
    ac, an, pr : pdidocli;
    pedod : pedidocliente;
    rac, ran, rpr : pretor;
    reto : regretorno;
 
  function fechasistema : string;
  var
    an, me, di, dis : Word;
    elna : string[4];
    elme, eldi : string[2];
    begin
       GetDate(an,me,di,dis);
       str(an,elna);
       str(me, elme);
       str(di, eldi);
       fechasistema := eldi + '/' + elme + '/' + elna;
    end;
 
   function poncero(w : word) : string;
   var
      s : string;
    begin
      str(w:0,s);
      if length(s) = 1 then
       s := '0' + s;
      poncero := s;
    end;
 
   function horasistema : string;
   var
     ho, mi, se, dec : word;
     laho, elmi : string[2];
    begin
       gettime(ho,mi,se,dec);
       laho := poncero(ho);
       elmi := poncero(mi);
       horasistema := laho + ':' + elmi;
    end;
 
  procedure asigna_retorno(rto : regretorno);
  begin
     if rpr <> nil then
     begin
        new(rac);
        rac^ := rto;
        rpr := rac;
        rac^.arg := nil;
     end
  else
      begin
        ran := rac;
        new(rac);
        rac^ := rto;
        ran^.arg := rac;
        rac^.arg := nil;
      end;
  end;
 
  procedure entrada_retorno;
  var
    t : char;
  begin
     clrscr;
     gotoxy(22,2);write('ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ');
     gotoxy(22,3);write(**** Entrada De Retorno ****    ³Þ');
     gotoxy(22,4);write('ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÞ');
     gotoxy(22,5);write(' ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß');
     gotoxy(12,7);write('ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ');
     gotoxy(12,8);write('³  Codigo Cliente         :                            ³Þ');
     gotoxy(12,9);write('³  Nombre Cliente         :                            ³Þ');
    gotoxy(12,10);write('³  Fecha Compra Arcticulo :                            ³Þ');
    gotoxy(12,11);write('³  Fecha                  :                            ³Þ');
    gotoxy(12,12);write('³  Hora                   :                            ³Þ');
    gotoxy(12,13);write('³  Codigo Articulo        :                            ³Þ');
    gotoxy(12,14);write('³  Nombre Articulo        :                            ³Þ');
    gotoxy(12,15);write('³  Motivo Retorno         :                            ³Þ');
    gotoxy(12,16);write('ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÞ');
    gotoxy(12,17);write(' ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß');
    with reto do
    begin
       gotoxy(40,8);readln(Codigo_Cliente);
       gotoxy(40,9);readln(Nombre_Cliente);
       gotoxy(40,10);readln(Fecha_Compra_Articulo);
       Fecha := fechasistema;
       gotoxy(40,11);write(fecha);
       Hora := horasistema;
       gotoxy(40,12);write(hora);
       gotoxy(40,13);readln(Codigo_Articulo);
       gotoxy(40,14);readln(Nombre_Articulo);
       gotoxy(40,15);readln(Motivo_Retorno);
    end;
     gotoxy(10,18);write('** Datos Correctos [S/N] **');
     repeat
        t := upcase(readkey);
    until t in['S','N'];
    if t = 'S' then
    begin
       asigna_retorno(reto);
    end
  else
     begin
        entrada_retorno;
     end;
  end;
 
  procedure asigna_pedido(pd : pedidocliente);
  begin
     if pr <> nil then
     begin
        new(ac);
        ac^ := pd;
        pr := ac;
        ac^.sge := nil;
     end
  else
      begin
        an := ac;
        new(ac);
        ac^ := pd;
        an^.sge := ac;
        ac^.sge := nil;
      end;
   end;
 
  procedure  entrada_pedido;
  var
    tr, t : char;
    cont, i : integer;
    begin
      fillchar(pedod,sizeof(pedod),0);
      clrscr;
      gotoxy(24,4);write('ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿');
      gotoxy(24,5);write(** Entrada Datos Pedido **     ³Þ');
      gotoxy(24,6);write('ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÞ');
      gotoxy(24,7);write(' ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß');
      gotoxy(2,8);write('ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿');
      gotoxy(2,9);write('³ Codigo Cliente :            ³Þ');
     gotoxy(2,10);write('ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÞ');
     gotoxy(2,11);write(' ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß');
     gotoxy(36,8);write('ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿');
     gotoxy(36,9);write('³ Nombre Cliente :                      ³Þ');
    gotoxy(36,10);write('ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÞ');
    gotoxy(36,11);write(' ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß');
     gotoxy(2,12);write('ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿');
     gotoxy(2,13);write('³ Fecha :                 Hora :                ³Þ');
     gotoxy(2,14);write('ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÞ');
     gotoxy(2,15);write(' ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß');
     gotoxy(2,17);write('ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿');
     gotoxy(2,18);write('³   Cantidad Articulos :                        ³Þ');
     gotoxy(2,19);write('³   Codigo Articulos   :                        ³Þ');
     gotoxy(2,20);write('³   Nombre Articulos   :                        ³Þ');
     gotoxy(2,21);write('³   Precio Unitario    :                        ³Þ');
     gotoxy(2,22);write('³   Precio Total Linea :                        ³Þ');
     gotoxy(2,23);write('ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÞ');
     gotoxy(2,24);write(' ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß');
    with pedod do
    begin
    gotoxy(21,9);readln(Codigo_Cliente);
    gotoxy(55,9);readln(Nombre_Cliente);
    Fecha := fechasistema;
    hora := horasistema;
    gotoxy(12,13);write(fecha);
    gotoxy(35,13);write(hora);
    cont := 1;
   repeat
    gotoxy(27,18);readln(artic[cont].Cantidad_Articulo);
    gotoxy(27,19);readln(artic[cont].Codigo_Articulo);
    gotoxy(27,20);readln(artic[cont].Nombre_Articulo);
    gotoxy(27,21);readln(artic[cont].Precio_unitario);
    artic[cont].Precio_total := (artic[cont].Cantidad_Articulo *
                                   artic[cont].Precio_unitario);
    gotoxy(27,22);write(artic[cont].Precio_total:0:2);
    gotoxy(2,25);write(' **** Desea Entrar Mas Productos [S/N] ****');
    repeat
        tr := upcase(readkey);
    until tr in['S','N'];
    cont := cont + 1;
    gotoxy(2,25);clreol;
    if tr = 'S' then
    begin
       gotoxy(26,18);write('                       ');
       gotoxy(26,19);write('                       ');
       gotoxy(26,20);write('                       ');
       gotoxy(26,21);write('                       ');
       gotoxy(26,22);write('                       ');
    end;
   until (tr = 'N') or (cont > 5);
    total := 0.0;
    for i := 1 to cont - 1 do
    Total := Total + artic[i].Precio_total;
    gotoxy(2,25);write('**** Total Pedido = [',total:0:2,']');
   end;
    gotoxy(10,26);write('** Datos Correctos [S/N] **');
    repeat
        t := upcase(readkey);
    until t in['S','N'];
    if t = 'S' then
    begin
       asigna_pedido(pedod);
    end
  else
     begin
        entrada_pedido;
     end;
  end;
 
  procedure asigna_producto(p : regproducto);
  begin
     if pri = nil then
     begin
        new(act);
        act^ := p;
        pri := act;
        act^.sigp := nil;
     end
  else
     begin
        ant := act;
        new(act);
        act^ := p;
        ant^.sigp := act;
        act^.sigp := nil;
     end;
  end;
 
  procedure entrada_producto;
  var
    th : char;
  begin
      fillchar(produc,sizeof(produc),0);
      clrscr;
      gotoxy(24,4);write('ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿');
      gotoxy(24,5);write(** Entrada Datos Producto **    ³Þ');
      gotoxy(24,6);write('ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÞ');
      gotoxy(24,7);write(' ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß');
      gotoxy(2,8);write('ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿');
      gotoxy(2,9);write('³ Codigo :                 ³Þ');
     gotoxy(2,10);write('ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÞ');
     gotoxy(2,11);write(' ßßßßßßßßßßßßßßßßßßßßßßßßßßßß');
     gotoxy(30,8);write('ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿');
     gotoxy(30,9);write('³ Nombre :                 ³Þ');
    gotoxy(30,10);write('ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÞ');
    gotoxy(30,11);write(' ßßßßßßßßßßßßßßßßßßßßßßßßßßßß');
     gotoxy(2,12);write('ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿');
     gotoxy(2,13);write('³ Descripcion :                                 ³Þ');
     gotoxy(2,14);write('ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÞ');
     gotoxy(2,15);write(' ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß');
    gotoxy(20,16);write('ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿');
    gotoxy(20,17);write('³ Precio :                 ³Þ');
    gotoxy(20,18);write('ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÞ');
    gotoxy(20,19);write('  ßßßßßßßßßßßßßßßßßßßßßßßßßßß');
    with produc do
    begin
    gotoxy(13,9);readln(Codigo_Articulo);
    gotoxy(41,9);readln(Nombre_Articulo);
    gotoxy(18,13);readln(Descripcion_Articulo);
    gotoxy(31,17);readln(Precio_Articulo);
    end;
    gotoxy(20,19);write('** Datos Correctos [S/N] **');
    repeat
        th := upcase(readkey);
    until th in['S','N'];
    if th = 'S' then
    begin
       asigna_producto(produc);
    end
  else
     begin
        entrada_producto;
     end;
  end;
 
  procedure asigna_datos(d : registrocliente);
  begin
     if prim = nil then
     begin
        new(actu);
        actu^ := d;
        prim := actu;
        actu^.sig := nil;
     end
  else
     begin
        ante := actu;
        new(actu);
        actu^ := d;
        ante^.sig := actu;
        actu^.sig := nil;
     end;
  end;
 
  procedure  entradas_datos;
  var
   te : char;
  begin
     fillchar(cliente,sizeof(cliente),0);
     clrscr;
     gotoxy(20,2);write('****[Entrada De Datos Cliente]****');
     gotoxy(20,3);write('==================================');
     gotoxy(3,5);write('[Cedula]      : ');
     gotoxy(30,5);write('[Nombre]          : ');
     gotoxy(3,7);write('[Telefono]    : ');
     gotoxy(30,7);write('[Movil]           : ');
     gotoxy(3,9);write('[Sexo]        : ');
     gotoxy(30,9);write('[Direccion]       : ');
     gotoxy(3,11);write('[Credito S/N] : ');
     gotoxy(30,11);write('[Importe Credito] : ');
     gotoxy(3,13);write('[Cod.Cliente] : ');
     gotoxy(30,13);write('[Nom. Cliente]    : ');
     with cliente do
     begin
     gotoxy(19,5);readln(cedula);
     gotoxy(50,5);readln(nombre);
     gotoxy(19,7);readln(telefono);
     gotoxy(50,7);readln(movil);
     gotoxy(19,9);readln(sexo);
     gotoxy(50,9);readln(direccion);
     gotoxy(19,11);readln(credito);
     gotoxy(50,11);readln(Monto_Credito);
     gotoxy(19,13);readln(Cod_T_Cliente);
     gotoxy(50,13);readln(Nombre_T_Cliente);
     end;
     gotoxy(20,15);write('>>>> Los Datos Son Correctos [S/N] <<<<');
     repeat
         te := upcase(readkey);
     until te in['S','N'];
     if te = 'S' then
     begin
     asigna_datos(cliente);
     end
   else
      begin
         entradas_datos;
      end;
  end;
 
 
 
 
  procedure menu_jeneral;
  var
    sal : boolean;
    tecla : char;
  begin
      sal := false;
    repeat
        clrscr;
        writeln('   ***** Menu Jeneral *****');
        writeln;
        writeln('   1. Ingresar Datos de Cliente');
        writeln('   2. Ingresar Articulos');
        writeln('   3. Ingresar Pedido de Cliente');
        writeln('   4. Ingresar Solicitud de Retorno de Mercaderia');
        writeln('   5. Salir');
        writeln;
        writeln('   <<<< Elija Opcion >>>>');
        repeat
            tecla := readkey;
        until tecla in['1','2','3','4','5'];
       clrscr;
    case tecla of
  '1' : entradas_datos;
  '2' : entrada_producto;
  '3' : entrada_pedido;
  '4' : entrada_retorno;
  '5' : sal := true;
    end;
    until sal = true;
  end;
 
 
 
 begin
    prim := nil;
    pri := nil;
    pr := nil;
    rpr := nil;
    menu_jeneral;
    if prim <> nil then
    dispose(actu);
    if pri <> nil then
    dispose(act);
    if pr <> nil then
    dispose(ac);
    if rpr <> nil then
    dispose(rac);
 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