Re: Newbie to VB: to what degree is VB event driven




"dpb" <none@xxxxxxx> wrote in message news:fbunes$2bb$1@xxxxxxxxxxx
Bob Butler wrote:
"jjoensuu" <j_joensuu@xxxxxxxxx> wrote in message
news:1189267210.888569.168870@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi folks

I was reading a book about programming C++ and this book had an
example code of creating a user menu with the help of a "switch"
statement inside a 'forever loop' (a "for" loop that only exists if
the user chooses a specific option from the menu).

Sounds odd but perhaps there's an underlying reason
...

Like a standalone app in a nonwindowed environment, maybe??? :)

--

Actually, that sounds like the old days, when you got to write your own windows
procedure. They were often constructed as a loop with a switch based on an
incoming message. The loop included calls to retrieve messages, which was the
point where the program effectively yielded to the OS until a message was
available. In fact most Windows programs, including VB apps, have something like
it under the hood somewhere, with some of the messages mapped to events that
trigger our event handler code.


.



Relevant Pages

  • Re: Newbie to VB: to what degree is VB event driven
    ... I was reading a book about programming C++ and this book had an ... statement inside a 'forever loop' (a "for" loop that only exists if ... In fact most Windows programs, including VB apps, have something like it under the hood somewhere, with some of the messages mapped to events that trigger our event handler code. ... Spent a significant fraction of career w/ embedded and standalone systems--most of them w/ no OS, file system, some w/o even any visible "O" for i/o. ...
    (microsoft.public.vb.general.discussion)
  • Newbie to VB: to what degree is VB event driven
    ... I was reading a book about programming C++ and this book had an ... example code of creating a user menu with the help of a "switch" ... statement inside a 'forever loop' (a "for" loop that only exists if ...
    (microsoft.public.vb.general.discussion)
  • Re: Brian Kernighan, maybe Im not worthy, maybe Im scum
    ... and just hone in on the stuff related to programming and this newsroup] ... moron that was taken from optimization which does hoist when to do so ... compiler design and optimization, including my 1976 text in graduate ... loop in a language in which the designers messed up, ...
    (comp.programming)
  • Re: what does "serialization" mean?
    ... language programming and found that my productivity increased to the ... the use of an expression in the For loop is not only ... acceptable it's good style because it forces the reader to understand. ... If the reader doesn't understand the language he must get ...
    (comp.programming)
  • cant get out of infinite while loop
    ... To get into the infinite loop, I write to a file the "on" status ... writing switch on ... ready to sleep for 10 seconds ... or die "Problem passing files to the bridge directory...$!"; ...
    (comp.lang.perl.misc)