Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionprivate type nbFoisMots mot as string nombre as integer end type public function nbFroi(texte() as string) dim tableau() as nbFoisMots dim i as integer, j as integer dim trouver as boolean redim tableau(-1) for i = lbound(texte) to ubound(texte) trouver = false for j = lbound(tableau) to ubound(tableau) if tableau(j).mot = texte(i) then trouver = true tableau(j).nombre = tableau(j).nombre + 1 end if next j if not trouver then redim preserve tableau(ubound(tableau) + 1) tableau(ubound(tableau)).mot = texte(i) tableau(ubound(tableau)).nombre = 1 end if next i end function