If true then
end if

seems clearer to me.

Le 23 janv. 07 à 18:15 Soir, [EMAIL PROTECTED] a écrit:

On Jan 23, 2007, at 16:55 UTC, Norman Palardy wrote:

Often a better approach is to refactor your code so that one method
only does one thing, and the above trick isn't needed.  But
sometimes
it's worthwhile, so I thought I'd point it out.

Seems like the best fix would be to fix .Close so work arounds like
this are unnecessary

It's not a work-around, and even if Close (or rather, the write methods after closing) were changed as requested, I still wouldn't use it. The
point is, once the stream has been closed, I don't want to be able to
use it any more -- and if I mistakenly do, I want this caught at
compile time, not at run time.  That's why it's better to never call
Close, but instead rely on the object going out of scope when you're
done with it.

Use of a do-loop is a "work-around" only in the sense that it's a
little obtuse.  Slightly better might be something like:

  do once
    // ...
  end do

But this would require too many changes to the language to be worth it:
"end do" instead of "loop" and a new "once" keyword.  "Do until true"
seems a little odd the first time you see it, but then you've seen it
and it's no stranger than using "dim" to declare a variable.

_______________________________________________
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