Pascal/Turbo Pascal - necesito ayuda con error

 
Vista:

necesito ayuda con error

Publicado por camilo (2 intervenciones) el 04/08/2007 11:09:47
este es el programa
program xx;
type
alumno=record
a,n:string[15];
d:string[20];
e:integer;
archivo=file of alumno;
var
f:archivo;x,op:integer;
a:alumno;

begin
assign(f,'c:alumnos.dat');
{rutina}

while not eof(t) do

begin
read(f,a);
repeat
writeln('modificando alumno');
writeln('1_ingresar edad');
writeln('2_sumar 100');
writeln('ingrese su opcion 1,2');
readln(op);

until op in [1..2];
if op=1 then

begin
writeln('ingrese nueva edad');
readln(a.e);
end;

if op = 2 then a.e:=a.e+100;
x:=filepos(f)-1;
seek(f,x);
write(f,a);
writeln('presione enter para continuar');
readln;
end;

reset(t);
while not eof (x) do
begin
readln(f,a);
writeln('apellido');
writeln(a,a);
writeln('nombre');
writeln(a.n);
writeln('direccion');
writeln(a.d);
writeln('edad');
writeln(a.e);
writeln('precione enter para continuar');
readln;
end;
close(f);
readln;
end.
me sala un error de : en la parte de alumno y archivo, si me podes dar una mano con eso te lo voy a agradecer :) bueno gracias
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

RE:necesito ayuda con error

Publicado por Diego Romero (996 intervenciones) el 04/08/2007 11:15:51
Te falta un end; para cerrar el record

alumno=record
a,n:string[15];
d:string[20];
e:integer;
end; { <--- cierra el record }
archivo=file of alumno;
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

RE:necesito ayuda con error

Publicado por Daniel Sanchez (2 intervenciones) el 13/08/2007 13:27:27
Hombre yo diria tambien que antes de leer o escribir en un archivo pusieras reset o rewrite respectivamente sino daria tambien error....
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