| To: | REALbasic Network Users Group <realbasic-nug at lists dot realsoftware dot com> |
|---|---|
| Subject: | Re: Need help with a runtime error |
| From: | Kevin Rudman <kevin dot rudman at ntlworld dot com> |
| Date: | Wed, 27 Feb 2002 20:25:55 +0000 |
on 27/2/02 7:21 pm, Terry Hulseberg at RB at Hulseberg dot com wrote:
> Dim i As Integer
>
> For i = WindowCount downTo 1
> window(WindowCount-1).close
> next
Perhaps better to do:
Dim i, n As Integer
n = WindowCount-1
For i = n DownTo 0
window(i).close
Next
That way you evaluate WindowCount once only and avoid tinkering with the
loop count evaluation from within the loop, which makes things clearer, if
not less dangerous too!
Kevin Rudman
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Quicktime declares, Erick Tejkowski |
|---|---|
| Next by Date: | Re: Need help with a runtime error, Charles Yeomans |
| Previous by Thread: | Re: Need help with a runtime error, Terry Hulseberg |
| Next by Thread: | Re: Need help with a runtime error, Charles Yeomans |
| Indexes: | [Date] [Thread] [Top] [All Lists] |