
06/11/2008, 10:49
|
 | | | Fecha de Ingreso: marzo-2007
Mensajes: 307
Antigüedad: 18 años, 2 meses Puntos: 17 | |
Respuesta: Arreglo con recursividad en BV 6.0 yo dejaria algo como
public sub buscarnum(numero,indice)
if arreglo(indice)=numero then
xxx=msgbox("Numero encontrado en la posicion " & indice & " del
arreglo",vbinformation)
else
if indice>9 then
xxx=msgbox("Numero no encontrado",vbinformation)
else
buscanum(numero,indice+1)
endif
endif
end sub
y en el boton buscar reemplazo el ciclo for i =0 to 9 por :
buscanum(num_buscar.text,0) |