modificacion de una funcion
Publicado por Sara (6 intervenciones) el 18/02/2015 16:07:13
Necesito hacer esta función de una forma más fácil sin tener en cuenta las mayúsculas y minúsculas.
Gracias
Gracias
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Function buscar_producto (ces:Tcesta; cu:string): integer;
Var
pos, i, m :integer;
prod:string;
begin
for m:= 1 to length(cu) do
begin
cu[m]:=upcase(cu[m]);
end;
buscar_producto:=0;
for i:= 1 to tammaxcesta do
begin
for m:= 1 to length(ces[i].nombre) do
begin
prod[m]:= upcase(ces[i].nombre[m]);
prod[0]:= chr(m);
end;
end;
if prod=cu then
begin
pos:=i;
end;
buscar_producto:=pos;
end;
Valora esta pregunta


0