Das Notes Forum

Domino 9 und frühere Versionen => Entwicklung => Thema gestartet von: feargus am 24.01.02 - 11:33:59

Titel: Array sortieren
Beitrag von: feargus am 24.01.02 - 11:33:59
kennt einer ne einfache Möglichkeit ein Array zu sortieren ???
Titel: Re: Array sortieren
Beitrag von: macke am 25.01.02 - 09:29:30
hier kleines Script

Sub Click(Source As Button)
   
    Dim ws    As New NotesUiWorkspace
    ws.Currentdocument.Document.Value = Sort(ws.Currentdocument.Document.Value)
   
End Sub


Function Sort(Value As Variant) As Variant
   
    Dim i    As Integer
    Dim j    As Integer
    Dim n    As Integer
    Dim hilf As String
   
    n = Ubound(Value)
   
    For i = 0 To n
         For j = i To n
              If (Value(i) > Value(j)) Then   ' Aufsteigend
                   hilf = Value(i)
                   Value(i) = Value(j)
                   Value(j) = hilf
              End If
         Next
    Next
   
    Sort = Value
   
End Function
Titel: Re: Array sortieren
Beitrag von: feargus am 25.01.02 - 11:33:24
besten Dank... habs mal ausprobiert. Funktioniert prima
Titel: Re: Array sortieren
Beitrag von: eknori am 13.02.02 - 13:38:48
schau mal hier nach:

http://www.atnotes.de/cgi-bin/yabb/YaBB.pl?board=004-1;action=display;num=1013520001

eknori