probleme mit _arraysort...

  • hi :)


    ich hab nen problem mit meiner funktion:

    [autoit]

    #include<Array.au3>
    Func _sort($text)
    Local $sort[1][2]
    $i = 0
    While True
    $char = StringLeft($text,1)
    $text = StringReplace($text,$char,"")
    $sort[$i][0] = $char
    $sort[$i][1] = @extended
    $i = $i+1
    ReDim $sort[$i+1][2]
    If $text = "" Then ExitLoop
    WEnd
    ReDim $sort[$i][2]
    Return _ArraySort($sort,1,0,0,0,1); <- hier hab ich schon ziemlich viel ausprobiert^^, aber bis jetzt hat noch nichts funktioniert :(
    EndFunc
    _ArrayDisplay(_sort("hallo wie geht es euch ?"))

    [/autoit]

    grez

    • Offizieller Beitrag

    Schon erledigt ;)

    [autoit]

    #include<Array.au3>
    Func _sort($text)
    Local $sort[1][2]
    $i = 0
    While True
    $char = StringLeft($text,1)
    $text = StringReplace($text,$char,"")
    $sort[$i][0] = $char
    $sort[$i][1] = @extended
    $i = $i+1
    ReDim $sort[$i+1][2]
    If $text = "" Then ExitLoop
    WEnd
    ReDim $sort[$i][2]
    _ArraySort($sort,1,0,0,2,1) ; erst sortieren
    Return $sort ; dann Return!!
    EndFunc
    _ArrayDisplay(_sort("hallo wie geht es euch ?"))

    [/autoit]