L
LuigiB
Guest
ciao Joe , no quello era il caso della funzione che elimina i ripetuti , prova questo script di esempio nel quale una matrice alimentata con numeri casuuali viene ordinata per le colonne 1-2-3 decrescenti .
A me sembra funzionare ...
A me sembra funzionare ...
Codice:
Option Explicit
Sub Main
Dim k,s
ReDim aVTest(1000,3)
For k = 1 To UBound(aVTest)
aVTest(k,0) = k
aVTest(k,1) = NumeroCasuale(1,1000)
aVTest(k,2) = NumeroCasuale(1,100)
aVTest(k,3) = NumeroCasuale(1,10)
Next
Call OrdinaMatrice(aVTest,- 1,"1,2,3")
Call Scrivi("Ordinamento per val1, val2 ,val3")
s = FormatSpace("Val.Orig.",10)
s = s & FormatSpace("Val.1",10)
s = s & FormatSpace("Val.2",10)
s = s & FormatSpace("Val.3",10)
Call Scrivi(s,True)
For k = 1 To UBound(aVTest)
s = FormatSpace(aVTest(k,0),10)
s = s & FormatSpace(aVTest(k,1),10)
s = s & FormatSpace(aVTest(k,2),10)
s = s & FormatSpace(aVTest(k,3),10)
Call Scrivi(s)
Next
End Sub
Ultima modifica di un moderatore: