home *** CD-ROM | disk | FTP | other *** search
/ PC World 2006 February / PCWorld_2006-02_cd.bin / software / vyzkuste / triky / triky.exe / autoit-v3-setup.exe / Examples / _ArrayReverse.au3 < prev    next >
Text File  |  2004-12-19  |  636b  |  25 lines

  1. #include <Array.au3>
  2. Dim $avArray[10]
  3. $avArray[0] = "JPM"
  4. $avArray[1] = "Holger"
  5. $avArray[2] = "Jon"
  6. $avArray[3] = "Larry"
  7. $avArray[4] = "Jeremy"
  8. $avArray[5] = "Valik"
  9. $avArray[6] = "Cyberslug"
  10. $avArray[7] = "Nutster"
  11. $avArray[8] = "Tylo"
  12. $avArray[9] = "JdeB"
  13.  
  14. _ArrayDisplay( $avArray, "Nomal" )
  15. _ArrayReverse( $avArray)
  16. _ArrayDisplay( $avArray, "Reversed" )
  17.  
  18. ; Example Reverse Array created with StringSplit.
  19. $avArray = StringSplit("0,1,2,3,4,5,6,7,8,9,10,11,12",",")
  20. _ArrayDisplay( $avArray, "Nomal" )
  21. _ArrayReverse( $avArray, 1)   ; added the 1 as second parameter
  22. _ArrayDisplay( $avArray, "Reversed" )
  23.  
  24. Exit
  25.