Thread: LinkedList
View Single Post
Old 12-05-2008, 02:57 AM   #3
Ammorth
I blink, therefore I am.
 
Ammorth's Avatar
 
Join Date: Sep 2006
Posts: 1,812

Submissions (10)

Ammorth is a glorious beacon of light (461)Ammorth is a glorious beacon of light (461)Ammorth is a glorious beacon of light (461)Ammorth is a glorious beacon of light (461)

Default

Quote:
Originally Posted by Pyrogasm
Nice and useful!

However, you should mention that indexes start with 0 (or so I assume from your comments), and this line is incorrect:
Collapse JASS:
//      call list[3] // returns 5
Should be:
//      call list[2] // returns 5

Thanks

Quote:
Originally Posted by Pyrogasm
Can you explain the SearchList function, please? If I use SEARCH_TYPE_GREATER, will it return the index of the first number than 5, which in this case would be 0?

Correct. It will return the index of the first element that meets the conditions. If nothing matches, it will return -1.
__________________
Ammorth is offline   Reply With Quote