On 15 Apr 2006, at 00:25, Charles Yeomans wrote:

Code correctness is sometimes a gain. Suppose you want to loop through an array and remove some elements. Using downto makes it much easier.

For i as Integer = UBound(theArray) downto 0
  If theArray(i)  = "foo" then
    theArray.Remove i
  End if
Next

Ah yes, of course. Hadn't thought of that. Thanks Charles.

All the best,

Mark.



_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to