Ver Mensaje Individual
  #8  
Antiguo 10-07-2010
jg_gutierrez jg_gutierrez is offline
Registrado
 
Registrado: mar 2009
Posts: 5
Reputación: 0
jg_gutierrez Va por buen camino
Para este cayo tengo esta otra funcion que podria ser muy ůtil:


{-------------------------------------------------------------------------------------------------
esta funcion es original de Foxpro/Visual Foxpro, le agregas una lista de elementos y te devuelve
true si la cadena contiene alguno de los elementos de la lista y false si no lo tiene.
ejemplo de uso:

VariableTexto:='gato';
if Inlist(VariableTexto,['perro','gato','canario'])=true then
begin
//es un gato
.....
end;
--------------------------------------------------------------------------------------------------}
Function Inlist(aCadena:string; aLista: array of String):boolean;
var i:Integer;
begin
Result:=false;
for i:=Low(aLista) to High(aLista) do
begin
if Uppercase(aCadena)=Uppercase(aLista[i]) then
begin
result:=true;
break;
end;
end;
end;
Responder Con Cita