Results 1 to 2 of 2

Thread: Program control flow?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jul 1999
    Huntingdon Valley, PA 19006
    I do gravitational computations in a loop which does not terminate until user touches a particular command button. The loop includes a DoEvents Call.

    If other command buttons, options, chkboxes, et cetera are used, I assume that the computations are interrupted.

    Does control return to the statement after the DoEvents Call? I assume it does. Suppose I start other indefinite loops (with DoEvents Calls included) during an interrupt? Will VB properly manage really complex control flow, and eventually return to the original computation loop after the DoEvents call?

    Does anybody understand what I am asking?

    Live long & prosper.

    The Dinosaur from prehistoric era prior to computers.

    Eschew obfuscation!
    If a billion people believe a foolish idea, it is still a foolish idea! 2010 Express
    64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    No, it won't if you start another infinite loop it won't ever return to your gravitational computation loop until it's terminated and has executed all code left in all procedures that were launched on the button event.

    That means only one thing, that doevents only allows to raise new events and will return when they are all executed
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width