Nomb=true

Philibert - 15 juil. 2000 à 09:48
 FlyKiller - 12 oct. 2000 à 23:52
je fais:

function Nomb
if intNb1 <> intNb2 then
Nomb=true
else
Nomb=false
end if
end function

do
intNb2 = int(rnd * (100))
loop while intNb2 = 0 and Nomb=true

mais rien à faire! il s'en fout completement et souvent intNb1=intNb2
comment faire ??? merci

1 réponse

Si tu faisis ceci:
- Tout en haut du module, tu tapes "Option Explicit"
- Tu déclare NomB comme ceci
"Function NomB(byval intNB1 as Integer, byval intNB2 as Integer) as Boolean
- Tu remplace l'appel à la fonction par
"Loop While .... And NomB(intNB1,intNB2)=False
0
Rejoignez-nous