Follow along with the video below to see how to install our site as a web app on your home screen.
Nota: This feature may not be available in some browsers.
di nulla ..scusa luigib
Si Luigi, l'avevo vista ed è una bellissima funzione, ma come aveva detto giomi: "appartiene ad un altro ceto sociale",
non ti sei accorto che nella tua funzione è impostato come indice di partenza 1 , devi fare la stessa cosa quando chiami OridnaMatriceL
Vedi l'allegato 2254446
Vedi l'allegato 2254445
Call OrdinaMatriceL(aStat, idMese, ord, 1)
sembrerebeb che tu non abbia registrato la dll , o forse non hai messo quella giusta , nell'icertezza scarca tutto daccapo.
allora vuol dire che funziona , forse è solo un problema di percezione ...Ho registrato l'ultima che si trovava nella dll n.20
allora vuol dire che funziona , forse è solo un problema di percezione ...
Sub Main()
Dim r(10),n1(1),n2(1),n3(1),n4(1),cLi(3,200),cLo(3,100),Dim uLt(4005,3)
ini = EstrazioneIni
fin = EstrazioneFin
r(10) = 1
cl = 54
ci = 10
For x1 = 1 To 89
For x2 = x1 + 1 To 90
n1(1) = x1
n2(1) = x2
For x = 1 To cl
cLi(1,x) = 0
cLi(2,x) = 0
cLi(3,x) = 0
Next
co = 0
ca =(cl - 1)*ci
cs = 0
For x = 0 To ca Step ci
co = co + 1
cLi(1,co) = co
ex = fin - x
Messaggio Time & " " & n1(1) & " " & n2(1)
p = SerieFreq(ex -(ci - 1),ex,n1,r,1)
If p > 0 Then cLi(2,co) = p
q = SerieFreq(ex -(ci - 1),ex,n2,r,1)
If q > 0 Then cLi(3,co) = q
If p > 0 And q > 0 Then cs = cs + 1
If cs = 1 And p > 0 And q > 0 Then
cr = cr + 1
uLt(cr,1) = co
uLt(cr,2) = n1(1)
uLt(cr,3) = n2(1)
End If
Next
Next
Next
OrdinaMatrice uLt,- 1,1
For x = 1 To 10
rig1 = rig1 + FormatSpace(uLt(x,1),4)
rig2 = rig2 + FormatSpace(uLt(x,2),4)
n3(1) = uLt(x,2)
rig3 = rig3 + FormatSpace(uLt(x,3),4)
n4(1) = uLt(x,3)
cl1 = 0
For z = 1 To cl
cl1 = cl1 + 1
If cl1 > 100 Then Exit For
cLo(1,z) = 0
cLo(2,z) = 0
cLo(3,z) = 0
Next
co1 = 0
For y = 0 To ca Step ci
co1 = co1 + 1
If co1 > 100 Then Exit For
cLo(1,co1) = co1
es = fin - y
Messaggio Time & " " & n3(1) & " " & n4(1)
p1 = SerieFreq(es -(ci - 1),es,n3,r,1)
If p1 > 0 Then cLo(2,co1) = p1
q1 = SerieFreq(es -(ci - 1),es,n4,r,1)
If q1 > 0 Then cLo(3,co1) = q1
Next
Scrivi Space(6) & n3(1) & " " & n4(1)
ScriviMatrice cLo,0,3
Next
End Sub
' SCRIVERE QUI IL PROPRIO CODICE COME SE FOSSE LA SUB MAIN DI SPAZIOMETIRA
Dim cLi(3, 200) As Long, cLo(3, 100) As Long, uLt(4005, 3) As Long
Dim n1(1) As Integer, n2(1) As Integer, n3(1) As Integer, n4(1) As Integer, r(10) As Integer
Dim ca As Integer, ci As Integer, cl As Integer, cl1 As Integer, co As Integer, co1 As Integer, cr As Integer, cs As Integer
Dim p As Integer, q As Integer, p1 As Integer, q1 As Integer, x As Integer, x1 As Integer, x2 As Integer, y As Integer, z As Integer
Dim es As Long, ex As Long, ini As Long, fin As Long
Dim lin1 As String, lin2 As String, lin3 As String
ini = EstrazioneIni
fin = EstrazioneFin
r(10) = 1
cl = 54
ci = 10
For x1 = 1 To 89
For x2 = x1 + 1 To 90
n1(1) = x1
n2(1) = x2
For x = 1 To cl
cLi(1, x) = 0
cLi(2, x) = 0
cLi(3, x) = 0
Next
co = 0
ca = (cl - 1) * ci
cs = 0
For x = 0 To ca Step ci
co = co + 1
cLi(1, co) = co
ex = fin - x
Messaggio Time & " " & n1(1) & " " & n2(1)
p = SerieFreq(ex - (ci - 1), ex, n1, r, 1)
If p > 0 Then cLi(2, co) = p
q = SerieFreq(ex - (ci - 1), ex, n2, r, 1)
If q > 0 Then cLi(3, co) = q
If p > 0 And q > 0 Then cs = cs + 1
If cs = 1 And p > 0 And q > 0 Then
cr = cr + 1
uLt(cr, 1) = co
uLt(cr, 2) = n1(1)
uLt(cr, 3) = n2(1)
End If
Next
Next
Next
OrdinaMatrice uLt, -1, 1
For x = 1 To 10
lin1 = lin1 + FormatString(CStr(uLt(x, 1)), " ", 2)
lin2 = lin2 + FormatString(CStr(uLt(x, 2)), " ", 2)
n3(1) = uLt(x, 2)
lin3 = lin3 + FormatString(CStr(uLt(x, 1)), " ", 2)
n4(1) = uLt(x, 3)
cl1 = 0
For z = 1 To cl
cl1 = cl1 + 1
If cl1 > 100 Then Exit For
cLo(1, z) = 0
cLo(2, z) = 0
cLo(3, z) = 0
Next
co1 = 0
For y = 0 To ca Step ci
co1 = co1 + 1
If co1 > 100 Then Exit For
cLo(1, co1) = co1
es = fin - y
Messaggio Time & " " & n3(1) & " " & n4(1)
p1 = SerieFreq(es - (ci - 1), es, n3, r, 1)
If p1 > 0 Then cLo(2, co1) = p1
q1 = SerieFreq(es - (ci - 1), es, n4, r, 1)
If q1 > 0 Then cLo(3, co1) = q1
Next
Scrivi Space(6) & n3(1) & " " & n4(1)
ScriviMatrice cLo, 0, 3
Next
Public Sub MyScriptRoutine()
' SCRIVERE QUI IL PROPRIO CODICE COME SE FOSSE LA SUB MAIN DI SPAZIOMETIRA
Dim aR(1) As Long, idMese As Long = 1, ord As Long = -1
Dim R As Long, i As LongLong, j As Long
ReDim aStat(UBound(aR) * 4005, 15) As Long
ReDim aId(UBound(aR), 89, 90) As LongLong
For R = 1 To 1
aR(R) = R
Next
Call GetAmbiSuRuotaSingola(aR(), idMese, ord)
' utilizzata per vedere se sbagliavo a caricare'
'Call GetIdAppoggioAmbi(aR, aId, aStat)
'For i = 1 To UBound(aStat)
'Scrivi aStat(i, 14) & "|" & aStat(i, 15)
'Next
End Sub
Sub GetAmbiSuRuotaSingola(aR() As Long, idMese&, ord&)
Dim idEstr&, idM&, s$, pres&, nR&
nR = UBound(aR)
Dim r As Long, p1 As Long, p2 As Long, E1 As Long, E2 As Long, id As LongLong
' per utilizzare matrice a 2 dimensioni sostituisco aStat(nR,90,14)
ReDim aStat(nR * 4005, 15) As Long
ReDim aId(nR, 89, 90) As LongLong
GetIdAppoggioAmbi(aR(), aId(), aStat()) ' questa funzione mi restituisce l indice del vettore dove coolocare i risultati
For idEstr = 1 To EstrazioniArchivio
idM = Month(DataEstrazione(idEstr))
For r = 1 To UBound(aR)
ReDim aE(5) As Long
Call GetArrayNumeriRuota(idEstr, aR(r), aE)
If aE(1) > 0 Then
Call OrdinaVettoreL(aE, 1, 1)
For p1 = 1 To 4
For p2 = p1 + 1 To 5
E1 = aE(p1)
E2 = aE(p2)
id = aId(r, E1, E2)
aStat(id, idM) = aStat(id, idM) + 1
Next
Next
End If
Next
Next
'Esempio 1
Call OrdinaMatriceL(aStat, idMese, ord, 1, 1)
'Call OrdinaStat(aStat, idmese, -1)
For id = 1 To UBound(aStat)
s = SiglaRuota(aStat(id, 13)) & " " & Format2(aStat(id, 14)) & "." & Format2(aStat(id, 15)) & " "
For E1 = 1 To 12
s = s & Format2(aStat(id, E1)) & " "
Next
Scrivi s
Next
End Sub
' arte dell arrangiamento dell accademia pasticcioni
Sub GetIdAppoggioAmbi(aRu() As Long, aId() As LongLong, aStat() As Long)
Dim i As Long, e1 As Long, e2 As Long, k As LongLong, m As Long
For i = 1 To UBound(aRu)
For e1 = 1 To 89
For e2 = e1 + 1 To 90
k + = 1
aId(i, e1, e2) = k
For m = 1 To 12
aStat(k, m) = 0
Next
aStat(k, 13) = aRu(i)
aStat(k, 14) = e1
aStat(k, 15) = e2
Next
Next
Next
End Sub
Sub OrdinaStat(aN() As Long, idC As Long, V As Long)
Dim lb As Long:lb = 1
Dim ub As Long:ub = UBound(aN)
Dim i As Long
Dim j As Long
If V = -1 Then
Do While lb < ub
For i = ub To lb + 1 Step -1
If aN(i, idC) > aN(i - 1, idC) Then
For j = 0 To UBound(aN, 2)
Scambia aN(i, j), aN(i - 1, j)
Next
End If
Next
lb = lb + 1
Loop
ElseIf V = 1 Then
Do While lb < ub
For i = ub To lb + 1 Step -1
If aN(i, idC) < aN(i - 1, idC) Then
For j = 0 To UBound(aN, 2)
Scambia aN(i, j), aN(i - 1, j)
Next
End If
Next
lb = lb + 1
Loop
End If
End Sub
Sub Scambia(a As Long, b As Long)
Dim t As Long = a
a = b
b = t
End Sub
End Module
Public Sub MyScriptRoutine()
' SCRIVERE QUI IL PROPRIO CODICE COME SE FOSSE LA SUB MAIN DI SPAZIOMETIRA
Dim cLi(3, 200) As Long, cLo(3, 100) As Long, uLt(4005, 3) As Long
Dim n1(1) As Integer, n2(1) As Integer, n3(1) As Integer, n4(1) As Integer, r(10) As Integer
Dim ca As Integer, ci As Integer, cl As Integer, cl1 As Integer, co As Integer, co1 As Integer, cr As Integer, cs As Integer
Dim p As Integer, q As Integer, p1 As Integer, q1 As Integer, x As Integer, x1 As Integer, x2 As Integer, y As Integer, z As Integer
Dim es As Long, ex As Long, ini As Long, fin As Long
Dim lin1 As String, lin2 As String, lin3 As String
ini = EstrazioneIni
fin = EstrazioneFin
r(10) = 1
cl = 54
ci = 10
For x1 = 1 To 89
For x2 = x1 + 1 To 90
n1(1) = x1
n2(1) = x2
For x = 1 To cl
cLi(1, x) = 0
cLi(2, x) = 0
cLi(3, x) = 0
Next
co = 0
ca = (cl - 1) * ci
cs = 0
For x = 0 To ca Step ci
co = co + 1
cLi(1, co) = co
ex = fin - x
Messaggio Time & " " & n1(1) & " " & n2(1)
p = SerieFreq(ex - (ci - 1), ex, n1, r, 1)
If p > 0 Then cLi(2, co) = p
q = SerieFreq(ex - (ci - 1), ex, n2, r, 1)
If q > 0 Then cLi(3, co) = q
If p > 0 And q > 0 Then cs = cs + 1
If cs = 1 And p > 0 And q > 0 Then
cr = cr + 1
uLt(cr, 1) = co
uLt(cr, 2) = n1(1)
uLt(cr, 3) = n2(1)
End If
Next
Next
Next
Call OrdinaMatriceL(uLt, "1,2,3", , 1)
For x = 1 To 10
lin1 = lin1 + FormatString(CStr(uLt(x, 1)), " ", 2)
lin2 = lin2 + FormatString(CStr(uLt(x, 2)), " ", 2)
n3(1) = uLt(x, 2)
lin3 = lin3 + FormatString(CStr(uLt(x, 1)), " ", 2)
n4(1) = uLt(x, 3)
cl1 = 0
For z = 1 To cl
cl1 = cl1 + 1
If cl1 > 100 Then Exit For
cLo(1, z) = 0
cLo(2, z) = 0
cLo(3, z) = 0
Next
co1 = 0
For y = 0 To ca Step ci
co1 = co1 + 1
If co1 > 100 Then Exit For
cLo(1, co1) = co1
es = fin - y
Messaggio Time & " " & n3(1) & " " & n4(1)
p1 = SerieFreq(es - (ci - 1), es, n3, r, 1)
If p1 > 0 Then cLo(2, co1) = p1
q1 = SerieFreq(es - (ci - 1), es, n4, r, 1)
If q1 > 0 Then cLo(3, co1) = q1
Next
Scrivi Space(6) & n3(1) & " " & n4(1)
ScriviMatrice cLo, 0, 3, 1, , , cl
Next
End Sub
Ciao Luigi grazie e, come dice il detto: "sbagliando s'impara" , e da te c'è sempre da imparare.nuovo aggiornamento dovrebbero essersi risolti i problem isu ordinamatrice e ho agginto la funzione TabelloneAnalitico come chiesto da happy
DDLLScript_per_utenti
MediaFire is a simple to use free service that lets you put all your photos, documents, music, and video in a single place so you can access them anywhere and share them everywhere.www.mediafire.com
REGISTRARE LA DLL
a proposito Happy il tuo script ha qualche errore dovuto alla differenza d'uso e funzionamento della funzione di ordinmeto , come avevi fatto tu non andava bene , lo script che dovrai usare in twinbasic dopo aver scaricato questo nuovo aggiornamenot è questo , per far uscire le cose tali e quali in spaziometria devi fare cosi
Vedi l'allegato 2254520
Codice:Public Sub MyScriptRoutine() ' SCRIVERE QUI IL PROPRIO CODICE COME SE FOSSE LA SUB MAIN DI SPAZIOMETIRA Dim cLi(3, 200) As Long, cLo(3, 100) As Long, uLt(4005, 3) As Long Dim n1(1) As Integer, n2(1) As Integer, n3(1) As Integer, n4(1) As Integer, r(10) As Integer Dim ca As Integer, ci As Integer, cl As Integer, cl1 As Integer, co As Integer, co1 As Integer, cr As Integer, cs As Integer Dim p As Integer, q As Integer, p1 As Integer, q1 As Integer, x As Integer, x1 As Integer, x2 As Integer, y As Integer, z As Integer Dim es As Long, ex As Long, ini As Long, fin As Long Dim lin1 As String, lin2 As String, lin3 As String ini = EstrazioneIni fin = EstrazioneFin r(10) = 1 cl = 54 ci = 10 For x1 = 1 To 89 For x2 = x1 + 1 To 90 n1(1) = x1 n2(1) = x2 For x = 1 To cl cLi(1, x) = 0 cLi(2, x) = 0 cLi(3, x) = 0 Next co = 0 ca = (cl - 1) * ci cs = 0 For x = 0 To ca Step ci co = co + 1 cLi(1, co) = co ex = fin - x Messaggio Time & " " & n1(1) & " " & n2(1) p = SerieFreq(ex - (ci - 1), ex, n1, r, 1) If p > 0 Then cLi(2, co) = p q = SerieFreq(ex - (ci - 1), ex, n2, r, 1) If q > 0 Then cLi(3, co) = q If p > 0 And q > 0 Then cs = cs + 1 If cs = 1 And p > 0 And q > 0 Then cr = cr + 1 uLt(cr, 1) = co uLt(cr, 2) = n1(1) uLt(cr, 3) = n2(1) End If Next Next Next Call OrdinaMatriceL(uLt, "1,2,3", , 1) For x = 1 To 10 lin1 = lin1 + FormatString(CStr(uLt(x, 1)), " ", 2) lin2 = lin2 + FormatString(CStr(uLt(x, 2)), " ", 2) n3(1) = uLt(x, 2) lin3 = lin3 + FormatString(CStr(uLt(x, 1)), " ", 2) n4(1) = uLt(x, 3) cl1 = 0 For z = 1 To cl cl1 = cl1 + 1 If cl1 > 100 Then Exit For cLo(1, z) = 0 cLo(2, z) = 0 cLo(3, z) = 0 Next co1 = 0 For y = 0 To ca Step ci co1 = co1 + 1 If co1 > 100 Then Exit For cLo(1, co1) = co1 es = fin - y Messaggio Time & " " & n3(1) & " " & n4(1) p1 = SerieFreq(es - (ci - 1), es, n3, r, 1) If p1 > 0 Then cLo(2, co1) = p1 q1 = SerieFreq(es - (ci - 1), es, n4, r, 1) If q1 > 0 Then cLo(3, co1) = q1 Next Scrivi Space(6) & n3(1) & " " & n4(1) ScriviMatrice cLo, 0, 3, 1, , , cl Next End Sub
il calendario ti ringraziaps x ilegend : tu hai come i due proff la versione 255? E l'aggiorni comunque sempre all'ultima? Io per adesso ho sempre la 254. Non dovevo farti conoscere.. il "save as" perchè adesso... chi ti raggiunge e ti ferma più?
In questo caso per un esigenza di quell oche si è rivelato un vero ESTETA delle interfaccie ovvero il nostro Legend