PCPT
Messages postés13280Date d'inscriptionlundi 13 décembre 2004StatutMembreDernière intervention 3 février 201847 7 sept. 2008 à 02:59
salut,
trop léger, à corriger et éventuellement à poster sur www.codyx.org
(même login / pass)
ce bout de code ne sera pas conservé, bonne soirée
cs_yvesyves
Messages postés561Date d'inscriptionsamedi 10 janvier 2004StatutMembreDernière intervention11 octobre 2010 6 sept. 2008 à 21:47
Tu perds énormément en performances si tu effectues un tri. Parcours juste ta liste.
Exemple :
Dim IdMax as Int32 = 0
For U as Int32= 0 to Ubound(MaListe)
If MaListe(U) > MaListe(IdMax) Then IdMax = U
Next
Msgbox("Plus grand nombre : " & Cstr(MaListe(IdMax)) & " à l'index : " & Cstr(IdMax))
7 sept. 2008 à 02:59
trop léger, à corriger et éventuellement à poster sur www.codyx.org
(même login / pass)
ce bout de code ne sera pas conservé, bonne soirée
6 sept. 2008 à 21:47
Exemple :
Dim IdMax as Int32 = 0
For U as Int32= 0 to Ubound(MaListe)
If MaListe(U) > MaListe(IdMax) Then IdMax = U
Next
Msgbox("Plus grand nombre : " & Cstr(MaListe(IdMax)) & " à l'index : " & Cstr(IdMax))