Acá les pego el repeat que me da error.
Código Delphi
[-]
Repeat
Write ('Ingrese el codigo del producto (1-5): '); Readln (producto);
If (producto > 0) and (producto < 6) then
Write ('Ingrese el movimiento a realizar (E/S): '); Readln (movimiento);
If ( upcase (movimiento)='E') or (upcase (movimiento)='S') then
Write ('Ingrese la cantidad de unidades: '); Readln (unidades);
if (unidades > 0) then
Case producto of
1: begin
if (upcase (movimiento) = 'E' )
then
begin
entrada1:=entrada1+1;
stock11:=stock11+unidades;
unentrante1:=unentrante1+unidades;
end
else
if (stock11 > unidades)
then
begin
salida1:=salida1+1;
stock11:=stock11-unidades;
unsalida1:=unsalida1+unidades;
end
else
Writeln ('La cantidad a extraer supera el stock');
end;
2: begin
if (upcase (movimiento) = 'E' )
then
begin
entrada2:=entrada2+1;
stock22:=stock22+unidades;
unentrante2:=unentrante2+unidades;
end
else
if (stock22 > unidades)
then
begin
salida2:=salida2+1;
stock22:=stock22-unidades;
unsalida2:=unsalida2+unidades;
end
else
Writeln ('La cantidad a extraer supera el stock');
end;
3: begin
if (upcase (movimiento) = 'E' )
then
begin
entrada3:=entrada3+1;
stock33:=stock33+unidades;
unentrante3:=unentrante3+unidades;
end
else
if (stock33 > unidades)
then
begin
salida3:=salida3+1;
stock33:=stock33-unidades;
unsalida3:=unsalida3+unidades;
end
else
Writeln ('La cantidad a extraer supera el stock');
end;
4: begin
if (upcase (movimiento) = 'E' )
then
begin
entrada4:=entrada4+1;
stock44:=stock44+unidades;
unentrante4:=unentrante4+unidades;
end
else
if (stock44 > unidades)
then
begin
salida4:=salida4+1;
stock44:=stock44-unidades;
unsalida4:=unsalida4+unidades;
end
else
Writeln ('La cantidad a extraer supera el stock');
end;
5: begin
if (upcase (movimiento) = 'E' )
then
begin
entrada5:=entrada5+1;
stock55:=stock55+unidades;
unentrante4:=unentrante5+unidades;
end
else
if (stock55 > unidades)
then
begin
salida5:=salida5+1;
stock55:=stock55-unidades;
unsalida5:=unsalida5+unidades;
end
else
Writeln ('La cantidad a extraer supera el stock');
end;
end
Else
Writeln ('La cantidad de unidades deben ser mayores a 0')
Else
Writeln ('Movimiento invalido')
Else
Writeln ('Codigo de producto invalido');
Write ('Desea cargar otra operacion? S/N '); readln (op);
until upcase(op) = 'N';
El lenguaje es Delphi y no se utiliza ninguna base de datos.
Gracias