| ||
Ciao HERAT ,
prova a verificare il seguente listato se fornisce i risultati voluti e se gli stessi sono corretti. SPOILER (clicca per visualizzare) Option Explicit 'Ricerca di Gruppi di Ambi Consecutivi con Capogioco su 2 Ruote: Scritto da Gam il 19.07.2023 - v. 1.0 Sub Main() Dim ruota1(1),ruota2(1) Dim st,at,capogioco,eIni,Efin,LivArch,cat,Gruppo,Att,Sto,Freq,Gr,r,k,x,r1,r2 Dim ambo(2),NumAmbi,PrimoEl,UltimoEl,conta NumAmbi = 3' numero ambi consecutivi eIni = EstrazioneFin - 500 Efin = EstrazioneFin LivArch = 0 For capogioco = 85 To 90 'impostare 90 per tutti i capigioco If ScriptInterrotto Then Exit Sub For r1 = 1 To 9 For r2 = r1 + 1 To 10 ruota1(1) = r1 ruota2(1) = r2 For k = 1 To 90 - NumAmbi + 1 If k = capogioco - NumAmbi + 1 Then k = k + NumAmbi If k > 90 Then Exit For Messaggio("NumeroAmbi " & NumAmbi & " Capogioco " & capogioco & " " & SiglaRuota(r1) & "-" & SiglaRuota(r2) & " " & k) For x = 0 To NumAmbi - 1 ambo(1) = capogioco :ambo(2) = k + x PrimoEl = Format2(k) UltimoEl = Format2(k + NumAmbi - 1) If capogioco <> k + x And(PrimoEl < 91 And UltimoEl < 91) Then Call AddNumeriToGruppoStatistico(ambo,r1): Call AddNumeriToGruppoStatistico(ambo,r2) : conta = conta + 1 Next If conta = NumAmbi Then Call StatisticaGruppoFormazioniTurbo(2,Att,Sto,Freq,Gruppo,eIni,Efin,LivArch) :Gr = Gr + 1 conta = 0 If Sto > 0 Then 'impostare un valore per limitare il numero di casi di ricerca 'Scrivi Gruppo If Att >= Sto Then ColoreTesto 2 Scrivi "Gruppo " & FormattaStringa(Gr,"00000") & " di " & Format2(NumAmbi) & " Ambi " & SiglaRuota(r1) & "-" & SiglaRuota(r2) & " [" & Format2(capogioco) & " " & PrimoEl & "-" & UltimoEl & "]" & " Sto " & FormattaStringa(Sto,"0000") & " Att " & FormattaStringa(Att,"0000") & " ***" ColoreTesto 0 Else Scrivi "Gruppo " & FormattaStringa(Gr,"00000") & " di " & Format2(NumAmbi) & " Ambi " & SiglaRuota(r1) & "-" & SiglaRuota(r2) & " [" & Format2(capogioco) & " " & PrimoEl & "-" & UltimoEl & "]" & " Sto " & FormattaStringa(Sto,"0000") & " Att " & FormattaStringa(Att,"0000") End If End If PrimoEl = "" UltimoEl = "" Next Next Next Next Scrivi TempoTrascorso End Sub Saluti |