Pascal/Turbo Pascal - Ayuda! PORFAVOR :)

 
Vista:

Ayuda! PORFAVOR :)

Publicado por Angel (15 intervenciones) el 21/12/2011 06:30:22
Resulta que tengo este programa pero primero me dice dos errores que son estos:
1.-Produccionalfin.pas(84,2) Error: Illegal expression
2.-Produccionalfin.pas(84,12) Fatal: Syntax error, ";" expected but "identifier ESCRIBE" found
_____________________________________________________________________________
y lo otro es que no entiendo por que cuando compilo y ejecuto el programa este inicia en el menú de producción si debería iniciar en por donde esta el membrete y me pide contraseña.
Si me corrigen en error se lo agradecería mucho...!
esto es un material de un proyecto que debo entregar aun soy novato es el primer año que estoy viendo programación.
MUCHÍSIMAS GRACIAS...!
Aquí les dejo el programa...!
_____________________________________________________________________________
program SOLCA;

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
uses crt;
const
   nombref: string[12]='agenda.dat';
   type
    tipoagenda = record
       nombre:    string[20];
       direccion: string[30];
       ciudad:    string[15];
       correo:        string[5];
       telef:     string[12];
       observ:    string[40]
       end;
       var
     FichAgenda: file of tipoagenda;
     ficha: TipoAgenda;
     NumFicha: word;
     Ultima: word;
     opcion: char;
     password:string;
     letra:char;
begin
clrscr;
textcolor(white);
gotoxy(25,2);writeln('Republica Bolivariana de Venezuela');
gotoxy(20,3);writeln('Ministerio del Poder Popular para la Defensa');
gotoxy(10,4);writeln('Universidad Nacional de la Fuerza Armada Nacional Bolivariana');
gotoxy(35,5);writeln('UNEFAB-ZULIA');
textcolor(14);
gotoxy(10,12);writeln(':::::::::::  :::::::::::   ::::          :::::::::::    :::::::::::');
gotoxy(10,13);writeln(':::::::::::  :::::::::::   ::::          :::::::::::    :::::::::::');
gotoxy(10,14);writeln('::::         :::     :::   ::::          ::::           ::::   ::::');
textcolor(9);
gotoxy(10,15);writeln('::::         :::     :::   ::::          ::::           ::::   ::::');
gotoxy(10,16);writeln(':::::::::::  :::     :::   ::::          ::::           ::::   ::::');
gotoxy(10,17);writeln(':::::::::::  :::     :::   ::::          ::::           :::::::::::');
gotoxy(10,18);writeln('       ::::  :::     :::   ::::          ::::           :::::::::::');
textcolor(4);
gotoxy(10,19);writeln('       ::::  :::     :::   ::::          ::::           ::::   ::::');
gotoxy(10,20);writeln(':::::::::::  :::::::::::   ::::::::::    :::::::::::    ::::   ::::');
gotoxy(10,21);writeln(':::::::::::  :::::::::::   :::::::::: :: ::::::::::: :: ::::   ::::');
textcolor(white);
password:='';
gotoxy(2,29);writeln ('INTRODUZCA SU CLAVE:');
repeat
letra:=readkey;
if (ord (letra)<>13) then
begin
password:=password+letra;
write ('*');
end;
 
if (password<>'2503') and (ord (letra)=13) then
begin
clrscr;
gotoxy(2,29);writeln ('ACCESO DENEGADO');
gotoxy(2,29);writeln ('INTRODUZCA SU CLAVE:');
password:='';
end;
 
until (ord (letra)=13) and (password='2503');
 
writeln;
clrscr;
 
 begin
   TextBackground(Black); TextColor(LightGray);
   ClrScr;
   window(23,3,80,25);
   writeln;writeln;writeln;
   TextColor(LightCyan);
   gotoxy(35,1);writeln('____________');
gotoxy(35,2);writeln ('|PRODUCCION|');
gotoxy(35,3);writeln('____________');
gotoxy(5,4);writeln('|1|Agregar  Empleado');
gotoxy(5,5);writeln('|2|Consultar Empleado');
gotoxy(5,6);writeln('|3|Eliminar Empleado');
gotoxy(5,7);writeln('|4|Volver al Menu');
 TextColor(LightGray);
   window(1,1,80,25);
   gotoxy(1,25);
    end;
 procedure Escribe;
 var
   i: byte;
 begin
   ClrScr;
   TextColor(White);
 
   TextBackground(Blue);
   gotoxy(1,2);write('    Agenda    (ficha actual: ',
     NumFicha,'/',ultima,')');
   clrEol;
   gotoxy(1,3);
       for i:= 1 to 80 do write('-');
   TextBackground(Black);
   TextColor(LightGray);
   seek( FichAgenda, NumFicha-1 );
   read( FichAgenda, ficha );
 
   with ficha do
     begin
     gotoxy(1,6);
     writeln('Nombre:  ', nombre); writeln;
     writeln; writeln('Direccion: ', direccion);
     writeln; writeln('Ciudad: ', ciudad);
     writeln; writeln('Correo: ', correo);
     writeln; writeln('Telefono: ', telef);
     writeln; writeln;
     writeln('Observaciones:  ',observ);
     end;
   TextColor(White);
   TextBackground(Blue);
     gotoxy(1,23);
 
       for i:= 1 to 80 do write('-');
     gotoxy(1,24);write('      1-Anterior  2-Posterior  3-Numero'
       + '  4-Agregar  5-Corregir  0-Terminar');
   clrEol;
   TextBackground(Black);
   TextColor(LightGray);
 end;
  procedure FichaNueva;
 begin
   ClrScr;
   TextColor(Yellow);
   NumFicha := Ultima + 1;
   writeln('Agregando la ficha ',NumFicha,'.');
   TextColor(LightGray);
 
   with ficha do
     begin
     writeln; writeln(' Nombre ');
     readln( nombre );
     writeln; writeln(' Dirección ');
     readln( direccion );
     writeln; writeln(' Ciudad ');
     readln( ciudad );
     writeln; writeln(' Correo ');
     readln( correo );
     writeln; writeln(' Telefono ');
     readln( telef );
     writeln; writeln(' Observaciones ');
     readln( observ );
   end;
 
   seek( FichAgenda, NumFicha-1 );
   write( FichAgenda,ficha );
   Ultima  := Ultima + 1;
 end;
 
 procedure Modifica;
 var
   temporal:string[100];
 begin
   ClrScr;
   TextColor(Yellow);
   writeln('Corrigiendo la ficha ',NumFicha,'.');
 
   TextColor(LightGray);
   with ficha do
     begin
     writeln; writeln(' Nombre (',
       nombre,') ');
       readln(temporal);
       if temporal<>''
         then nombre:=temporal;
     writeln;
     writeln(' Direccion (',direccion,') ');
       readln(temporal);
 
       if temporal<>'' then direccion:=temporal;
     writeln; writeln(' Ciudad (',ciudad,') ');
       readln(temporal);
       if temporal<>'' then ciudad:=temporal;
     writeln; writeln(' Correo (',correo,') ');
       readln(temporal);
       if temporal<>'' then correo:=temporal;
     writeln; writeln(' Telefono (',telef,') ');
       readln(temporal);
       if temporal<>'' then telef:=temporal;
     writeln; writeln('Observaciones (',observ,') ');
 
       readln(temporal);
       if temporal<>'' then observ:=temporal;
   end;
   seek( FichAgenda, NumFicha-1 );
   write( FichAgenda, ficha )
 end;
 
 procedure NumeroFicha;
 var
   numero: word;
 begin
   ClrScr;
   TextColor(Yellow);
   writeln('Saltar a la ficha con un determinado numero ');
   TextColor(LightGray);
   writeln;
   writeln('¿ Que numero de ficha ');
 
   readln( numero );
   if numero>0 then
     if numero<=ultima then
       NumFicha:=numero
     else
       NumFicha:=ultima;
 end;
 
 procedure Prepara;
 begin
   NumFicha := 1;
   Ultima := 0;
 
   assign( FichAgenda, nombref );
   {$I-}
   reset( FichAgenda );
   {$I+}
   if ioresult <>0  then
     begin
     ClrScr;
     writeln(' No existen datos.',
       '  Pulse una tecla para introducirlos.');
     pausa;
     rewrite( FichAgenda );
 
     close (FichAgenda );
     reset( FichAgenda );
     FichaNueva;
     end;
   Ultima := FileSize( FichAgenda );
 end;
 
 begin
 
   Saludo;
   prepara;
   repeat
     Escribe;
     opcion:='a';
     while not (opcion in ['0'..'5']) do
       opcion := readkey;
     case opcion of
       '1':
            if NumFicha>1 then NumFicha := NumFicha - 1;
       '2':
            if NumFicha<ultima then NumFicha := NumFicha + 1;
       '3':
            NumeroFicha;
       '4':
            FichaNueva;
       '5':
 
            Modifica;
       end;
   until opcion='0';
   Close( FichAgenda );
   ClrScr;
 end.
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! PORFAVOR :)

Publicado por Angel (15 intervenciones) el 22/12/2011 03:24:03
Ayuden POR FAVOR ya no se que hacer :(
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

Ayuda! PORFAVOR :)

Publicado por ramon (2158 intervenciones) el 22/12/2011 17:16:32
{Revisa los cambios realizados son despistes tuyos pon mas atencion}

program SOLCA;

uses crt;
const
nombref: string[12]='agenda.dat';
type
tipoagenda = record
nombre: string[20];
direccion: string[30];
ciudad: string[15];
correo: string[5];
telef: string[12];
observ: string[40]
end;
var
FichAgenda: file of tipoagenda;
ficha: TipoAgenda;
NumFicha: word;
Ultima: word;
opcion: char;
password:string;
letra:char;

procedure saludo;
begin
clrscr;
textcolor(white);
gotoxy(25,2);writeln('Republica Bolivariana de Venezuela');
gotoxy(20,3);writeln('Ministerio del Poder Popular para la Defensa');
gotoxy(10,4);writeln('Universidad Nacional de la Fuerza Armada Nacional Bolivariana');
gotoxy(35,5);writeln('UNEFAB-ZULIA');
textcolor(14);
gotoxy(10,12);writeln('::::::::::: ::::::::::: :::: ::::::::::: :::::::::::');
gotoxy(10,13);writeln('::::::::::: ::::::::::: :::: ::::::::::: :::::::::::');
gotoxy(10,14);writeln(':::: ::: ::: :::: :::: :::: ::::');
textcolor(9);
gotoxy(10,15);writeln(':::: ::: ::: :::: :::: :::: ::::');
gotoxy(10,16);writeln('::::::::::: ::: ::: :::: :::: :::: ::::');
gotoxy(10,17);writeln('::::::::::: ::: ::: :::: :::: :::::::::::');
gotoxy(10,18);writeln(' :::: ::: ::: :::: :::: :::::::::::');
textcolor(4);
gotoxy(10,19);writeln(' :::: ::: ::: :::: :::: :::: ::::');
gotoxy(10,20);writeln('::::::::::: ::::::::::: :::::::::: ::::::::::: :::: ::::');
gotoxy(10,21);writeln('::::::::::: ::::::::::: :::::::::: :: ::::::::::: :: :::: ::::');
textcolor(white);
password:='';
gotoxy(2,29);writeln ('INTRODUZCA SU CLAVE:');
repeat
letra:=readkey;
if (ord (letra)<>13) then
begin
password:=password+letra;
write ('*');
end;

if (password<>'2503') and (ord (letra)=13) then
begin
clrscr;
gotoxy(2,29);writeln ('ACCESO DENEGADO');
gotoxy(2,29);writeln ('INTRODUZCA SU CLAVE:');
password:='';
end;

until (ord (letra)=13) and (password='2503');

writeln;
clrscr;
end; {fin de saludo}

procedure menuda;
begin
TextBackground(Black); TextColor(LightGray);
ClrScr;
window(23,3,80,25);
writeln;writeln;writeln;
TextColor(LightCyan);
gotoxy(35,1);writeln('____________');
gotoxy(35,2);writeln ('|PRODUCCION|');
gotoxy(35,3);writeln('____________');
gotoxy(5,4);writeln('|1|Agregar Empleado');
gotoxy(5,5);writeln('|2|Consultar Empleado');
gotoxy(5,6);writeln('|3|Eliminar Empleado');
gotoxy(5,7);writeln('|4|Volver al Menu');
TextColor(LightGray);
window(1,1,80,25);
gotoxy(1,25);
end; {fin menuda}

procedure Escribe;
var
i: byte;
begin
ClrScr;
TextColor(White);

TextBackground(Blue);
gotoxy(1,2);write(' Agenda (ficha actual: ',
NumFicha,'/',ultima,')');
clrEol;
gotoxy(1,3);
for i:= 1 to 80 do write('-');
TextBackground(Black);
TextColor(LightGray);
seek( FichAgenda, NumFicha-1 );
read( FichAgenda, ficha );

with ficha do
begin
gotoxy(1,6);
writeln('Nombre: ', nombre); writeln;
writeln; writeln('Direccion: ', direccion);
writeln; writeln('Ciudad: ', ciudad);
writeln; writeln('Correo: ', correo);
writeln; writeln('Telefono: ', telef);
writeln; writeln;
writeln('Observaciones: ',observ);
end;
TextColor(White);
TextBackground(Blue);
gotoxy(1,23);

for i:= 1 to 80 do write('-');
gotoxy(1,24);write(' 1-Anterior 2-Posterior 3-Numero'
+ ' 4-Agregar 5-Corregir 0-Terminar');
clrEol;
TextBackground(Black);
TextColor(LightGray);
end; {fin escribe}

procedure FichaNueva;
begin
ClrScr;
TextColor(Yellow);
NumFicha := Ultima + 1;
writeln('Agregando la ficha ',NumFicha,'.');
TextColor(LightGray);

with ficha do
begin
writeln; writeln(' Nombre ');
readln( nombre );
writeln; writeln(' Dirección ');
readln( direccion );
writeln; writeln(' Ciudad ');
readln( ciudad );
writeln; writeln(' Correo ');
readln( correo );
writeln; writeln(' Telefono ');
readln( telef );
writeln; writeln(' Observaciones ');
readln( observ );
end;

seek( FichAgenda, NumFicha-1 );
write( FichAgenda,ficha );
Ultima := Ultima + 1;
end; {fin fichanueva}

procedure Modifica;
var
temporal:string[100];
begin
ClrScr;
TextColor(Yellow);
writeln('Corrigiendo la ficha ',NumFicha,'.');

TextColor(LightGray);
with ficha do
begin
writeln; writeln(' Nombre (',
nombre,') ');
readln(temporal);
if temporal<>''
then nombre:=temporal;
writeln;
writeln(' Direccion (',direccion,') ');
readln(temporal);

if temporal<>'' then direccion:=temporal;
writeln; writeln(' Ciudad (',ciudad,') ');
readln(temporal);
if temporal<>'' then ciudad:=temporal;
writeln; writeln(' Correo (',correo,') ');
readln(temporal);
if temporal<>'' then correo:=temporal;
writeln; writeln(' Telefono (',telef,') ');
readln(temporal);
if temporal<>'' then telef:=temporal;
writeln; writeln('Observaciones (',observ,') ');

readln(temporal);
if temporal<>'' then observ:=temporal;
end;
seek( FichAgenda, NumFicha-1 );
write( FichAgenda, ficha )
end; {fin modifica}

procedure NumeroFicha;
var
numero: word;
begin
ClrScr;
TextColor(Yellow);
writeln('Saltar a la ficha con un determinado numero ');
TextColor(LightGray);
writeln;
writeln('¿ Que numero de ficha ');

readln( numero );
if numero>0 then
if numero<=ultima then
NumFicha:=numero
else
NumFicha:=ultima;
end; {fin numeroficha}

procedure Prepara;
begin
NumFicha := 1;
Ultima := 0;

assign( FichAgenda, nombref );
{$I-}
reset( FichAgenda );
{$I+}
if ioresult <>0 then
begin
ClrScr;
writeln(' No existen datos.',
' Pulse una tecla para introducirlos.');
repeat until keypressed;
rewrite( FichAgenda );

close (FichAgenda );
reset( FichAgenda );
FichaNueva;
end;
Ultima := FileSize( FichAgenda );
end; {fin prepara}

begin {inicio programa}
Saludo;
prepara;
repeat
Escribe;
opcion:='a';
while not (opcion in ['0'..'5']) do
opcion := readkey;
case opcion of
'1':
if NumFicha>1 then NumFicha := NumFicha - 1;
'2':
if NumFicha<ultima then NumFicha := NumFicha + 1;
'3':
NumeroFicha;
'4':
FichaNueva;
'5':

Modifica;
end;
until opcion='0';
Close( FichAgenda );
ClrScr;
end. {fin programa}
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

Ayuda! PORFAVOR :)

Publicado por Angel (15 intervenciones) el 23/12/2011 05:13:21
GRACIAS :)
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

Ayuda! PORFAVOR :)

Publicado por Angel (15 intervenciones) el 23/12/2011 05:32:58
Ejecute el programa todo bn :) gregue un nuevo empleado sali volvi a ejecutar y sale un error dice
runtime error 100 at $00401a70
$00401A70
$00402729
$00409141
presione una tecla para continuar... :(
que hago? :/
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

Ayuda! PORFAVOR :)

Publicado por Angel (15 intervenciones) el 24/12/2011 02:46:44
LISTO AMIGO ERA UN ERROR MIO HEHE GRACIAS POR EL PROGRAMA ME SIRVIÓ DE MUCHO...!
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